Adds stack.Context to middleware and handlers