Extract exception handling into a middleware

Rescue exceptions that are raised and set the response. If the exception
rescued is not a Protobuf error, it is wrapped in a generic Protobuf
error.
Merge pull request #162 from localshred/exception_middleware

Extract exception handling into a middleware