WOT-842: Return non-200 HTTP responses on errors
WOT-842: Return non-200 HTTP responses on errors

 * Minor refactor to allow for better reusability
 * Ensure the callback passed to pgproc expects an error parameter
 * Translate Postgresql errors to HTTP response codes/messages

wotio/pgproc.http.js