Added facilities to reroute a request.
Arbitrary data can be passed to the new handler through a cookie, where it
will be stored as a json blob.

There is probably a better way to do this internally without cookies, which
would be ideal, but I can't figure it out. This will do for now.