Deduplicate server startup/shutdown test helpers

Also start prepping for selenium.
Add selenium tests with initial frontend testcase

To run tests after this change, you must download
``selenium-server-standalone.jar`` from
https://code.google.com/p/selenium/downloads/list, and set its path in
conf.json as "TESTING_SELENIUM_PATH".  Once done, ``npm test`` will
invoke Firefox for test cases.  See the Testing section in
INSTALLATION.md for details on running tests with and without an X
server, and with and without selenium.
Merge pull request #214 from yourcelf/selenium

Add selenium tests with initial frontend testcase