Add a trivial sanity test for the server

This is more to make sure it gets compiled when you run the tests
than anything else.

I took the opportunity to refactor the server a bit so everything's
not hanging out in global state.
Some server cleanup
Prevent concurrent writes

We still need to prevent reading rows that are being written.
Remove unnecessary HTTP method check
Avoid some string escaping
Don't need a pointer to a map
Better error handling around table initialization
Remove an extraneous comment