Support for running on different port and database, for tests

Not super sexy.  Mocha runs I didn't try to figure out a better way to
put it into the test env, so there are race conditions on when the env
gets set.  Tests need to wait until their before() to check the port, or
they will get the default ('dev') instead of the test port.  So run a
node server like: 'node server.js test' and then run mocha to test
against it.