http: reduce network traffic for authorization
- Authorization: header never changes for Basic authentication scheme,
so simply cache it. For Office 365 this reduces the network traffic
considerably, because we only get one 401 response for the first
request on a connection and not for every new request.
- don't throw away the security context unnecessarily. F.ex. a missing
photo fetch returns 404, but that shouldn't invalidate the security
context. Just throw it away for status codes 403, 407 and >= 500.