Refactor: tools: Rearrange crm_mon's main function.
The purpose of this patch is to make sure output_format is not changed
after pcmkoutput_new is called. There is an awful lot of places where
we change output_format after checking various flags and command line
options. Thus, pcmkoutput_new and related code must get called after
all of that but just before we actually do anything.
At the same time, we need to be careful to not initialize curses if
--version was passed. Thus, all the code doing all the checking should
not be run if we saw that command line option.