Simplified repositories dramatically

Replaced the 'connect' and 'handleQueryResponse' methods in the
common_repository with a 'query' method that establishes the connection,
performs the query, and manages calling the done() callback. The
repository classes now have to check the err variable, but it's not that
bad because they don't have to worry about calling done(). This feels a
little less weird, and is a lot less code.

Converted the common_repository module into a class, so the dbConfig
object does not need to be passed to every call to query().
Fix bug in top-level error handling.

When an error ocurred, the error was logged to the console but the
response would not return to the browser. Need to call res.send instead of
just calling res.status. res.status does not actually send the response to
the client.