(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 will always be removed. Therefore,
we'll never leak the credentials through validation error messages.

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 break those out into their own file.