Improve middleware performance

Use `Proc` objects in the different middlewares to set `:request` and `:context` data.

These objects are called when the payload is being prepared, in the same way that `data[:person]`.