Import settings with proper environment

Default to 'development'.

Use settings-defined port if $PORT is unset.
Use server.js for testing

Add "test" settings environment and use it for testing, rather than
setup.js so that it matches the real server.