agent: move the session handling logic down one layer
agent: move the session handling logic down one layer

This commit moves the session handling logic that was previously
defined in the `interceptSession` and `extractAndRestoreSession`
methods of the Cache down into the places where they were called by
the sessionHandler and sessionResponseWriter types.

This change leaves the code a bit better structured, with each type
defined in the package being responsible for one thing.

google/inverting-proxy