Reorder middleware so exception handler is first

Making the exception handler the first middleware ensures that all
exceptions are rescued. It also greatly simplifies the other middleware
since exceptions can simply be raised instead of returned in
env.response and exceptions don't need to be encoded.
Merge pull request #164 from localshred/catch_all_exceptions

Reorder middleware so exception handler is first