Factor out common code between cli utilities

The client, merger and server share common code. Factor it out to the
new class zuul.cmd.ZuulApp().

* Moved stack_dump_handler there. It is still a function.

* setup_logging() is shared by merger and server. The client simply
  override it (--verbose simply set the debug level).  We might want one
  day to have the client look at zuul.conf for its logging
  configuration.

* The merger now reports the Zuul version via the argparse action
  'version'.  The action asks argparse to invokes a method, print its
  result and exit immediately.  That brings it on par with client and
  server which have been using that action since commit aabb686b

* Client.gear_server_pid property is gone.  Seems to be a left over when
  the client got created out of the server code.

Change-Id: I0a3984a5650408ac5f5d6ecdb7518c339b392492
5 files changed