Future-proof against license-editions changes; major unit test improvements

This is a loaded pull request, but I can split it if necessary. The first part of the pull request resolves a minor issue whereby if we add a new licensing edition in a future release, and we then do rolling pool upgrade, and we /then/ restart a xapi on an un-upgraded slave, we will leak a future-edition into a past-xapi, which will make v6d go boom. We now handle this in xapi's startup code.

The second, and much more interesting, part of this pull request is a pair of unit tests for this change, and a series of changes I had to make to our unit testing infrastructure to support one of the tests. After this patch series, the unit test suite now starts up xapi's http-svr, http handlers, and unix domain sockets, so that we can make local API calls over the domain socket. It also changes how we create the mock database so that it is 1) global to the rest of xapi, and 2) backed to disk, which also allows us to run API calls. We can now inspect xapi databases in-between test runs, as well as load pre-made xapi databases into test cases (better support for this will be coming).

The new test case here also makes use of debug statements. It's apparently always been possible to have xapi's debug output in unit tests; it just requires a properly started rsyslogd. Happy unit testing!