Re-added the command-server Mercurial source control.

It should be now properly cleaned up on application shutdown (i.e. close the
command-server process).
Fix the `wk update` command.
Fixes for running in `mod_wsgi`.

* No more `wsgiutil` for now, since it's easy enough to write the script.
* Added a "context" to wiki parameters to communicate if we're running in normal
  mode, initialization mode (creating a new wiki), or background task mode.
* Mercurial source-control uses this context to decide how to setup (or not) a
  command server.
* Mercurial source-control is now sharing its command server per process, and
  tries to correctly shut it down on exit.