Add an error handler so 500 errors are json
Add an error handler so 500 errors are json

Previously it was using the express default, which is to return an html
page. This makes sure that all errors are handled by returning JSON.

mysociety/popit-api,mysociety/popit-api,Sinar/popit-api,Sinar/popit-api