3846: Improve timeout handling in PySDK KeepClient.

* Catch socket errors (including timeouts) and treat them as
  transient with regard to retry logic.
* Increase the default timeout to 5 minutes.  Given how long it can
  take to PUT 64MiB to a proxy and wait for two servers to return
  success, this seems like a reasonable default.  Future improvements
  could set different timeouts based on the request type and whether
  or not we're talking to a proxy.

Closes #3846.