Shutdown cleanly on SIGTERM

We get this for free for SIGINT, but have to do the equiv manually for
SIGTERM. This should fix the problem where the acid state lock files are
not removed on shutdown.
Turns out we were not using the binary package
Split the server test suite into two, to avoid needing email by default

The user self-registration feature uses email, so needs local outgoing email
on the host running the test, via the /sbin/sendmail interface. Many hosts do
not have local email, including our own build bot. So we split the test suite
into two parts: the main part which does not use self-registration and a
separate test of self-registration specifically. The self-registration test is
not enabled by default but can be enabled with:
  cabal configure --enable-tests --flag=test-create-user
This should fix our build bot.