Extract response encoding into a middleware

Invoke the stack, encode the response and store it in the env. If an
encoding error occurs, a generic Protobuf error is encoded and returned.
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
Merge pull request #161 from localshred/encoder_middleware

Extract response encoding into a middleware