TS-1890: authproxy caching and reliability fixes

  - Make sure that the requests to the authentication proxy are
  never cached. We must not accidentally use stale authentication
  information.

  - Add special handling for Content-Length when authorizing HEAD
  requests. We should not force the length to zero in this case
  because the client knows that HEAD responses must always have an
  empty body.