move proxy code to a module file

This allows us to include it from within another express app in case we
don't want to have a standalone proxy.

Just moves out the app.get and wraps it in module.exports and then
included that in the index file and uses the export to instantiate the
server.
Merge pull request #6 from mysociety/allow-use-as-module

move proxy code to a module file