[#6] Restructure config|db as functions, for easier testing.

Change config to export a function, requiring the env parameter to be
passed in, instead of directly using process.env. This makes testing
asynchronously much easier, as it is not necessary to modify process.env
directly. Change db similarly, passing env through to config.
[#6] Install vows 0.7.x as dev dependency.

vows is used for testing. To run all tests:

    vows

or for a document format:

    vows --spec
[#6] Test config.
[#6] Example .test.env, documenting usage.

To run all tests with foreman, copy .test.env.example to .test.env, and:

    foreman run -e .test.env vows
[#6] Test db.

Note that only the basic connection is tested, and no testing of the
select functionality takes place.
[#6] Change testing framework to mocha 1.8.x.

Install mocha 1.8.x as a dev dependency, and replace all vows tests
with mocha. To run all tests, copy .test.env.example to .test.env,
edit as required, and run:

    foreman run -e .test.env mocha

or for a document format:

    foreman run -e .test.env mocha -R spec
[#6] Fix typo in db test.
Merge branch 'test/6-server' into develop