Added Rack middleware

Middleware ensures that the nested diagnostic context is cleared between
requests. It is added by default by the Railtie.