Refactor: Implement crm_mon's one shot mode with a library function.
First, add minimal static versions of cib_connect, fencing_connect, and
pacemakerd_status. These functions do only as much as is necessary to
make a single request and display it. In particular, there's nothing
about event callbacks and main loops beyond what is absolutely
necessary. These versions are taken from what's already being done in
crm_mon, but cannot replace what's happening there.
Second, add a pcmk__output_cluster_status function. This takes a bunch
of arguments and basically does what mon_refresh_display in crm_mon
does.
Third, add a pcmk__status function. This basically does what the
existing one_shot function does - connect to the CIB and fencing if
required, call a function to do the display, and close connections
afterwards.
Having done this, one_shot can then just be turned into a wrapper around
pcmk__status that calls it, deals with error codes, and calls crm_mon's
clean_up function afterwards.