(NC-155) More type annotations in postgres.clj
(NC-155) Schema middleware simplifies exceptions.

The schema middleware removes from the exception data the schema and
value of arguments that did not actually fail validation. Since the
record containing the database credentials does not have a schema, it
will never fail validation, so it should always be removed. Therefore,
we'll never leak the credentials through validation error messages.
Just to be safe, though, the middleware also removes things that look
like they are database credentials (i.e. they have a :db key that
contains a map that itself has :user and :password keys).

Additionally, the schema failure middleware no longer interprets all
schema failures as 400s. We explicitly validate user input in http.clj
and throw a specific kind of error that causes the middleware to produce
a 400. Schema failures on get-* function outputs (presumed to be
a storage protocol implemantation function) produce a
`database-corruption` 500 response, and all others produce an
`application-error` 500 response.

Any other stray errors not caught by the schema or validation error
middlewares are caught by a catchall middleware that produces an
`application-error` 500 response with the message and stack trace of the
caught throwable.

With all these changes the middleware section of HTTP was getting pretty
long and contained a fair amount of utility functions not directly
relevant to the HTTP stuff, so they are broken out into their own file.
(NC-155) Document general error responses.
Merge pull request #41 from aperiodic/nc-155-credential-leak

(NC-155) Fix credential leak