Testing 2.0

This commit adds multiple features:
- "test mode" for the server. While in test mode the server
  runs on an alternative port and database. It also drops
  and rebuilds the entire database on start.
- setup and teardown fixture for unit testing that
  automatically starts the test server, and restarts it
  between tests wiping all data.