Rearrange startup to make gitk reloadable for development and testing.
This patch moves the startup code into procedures so that the script
can be re-sourced during interactive development. This also permits the
script to be loaded as a library to permit unit-testing of gitk functions.
In the global namespace where gitk lives, variable and global are equivalent
commands except that variable can assign a value when initializing the
global variable while global just declares a name in the global table.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>