Ideally solve both issues below in one PR, but issue 1 has priority as it can halt a pipeline.
Datastore client (and other httplib2-based clients for GCS, Dataflow, BigQuery, etc.) doesn't set a socket timeout.
This can cause _flush_batch() in datastoreio.py to block forever waiting for a response.
This issue is very similar to https://issues.apache.org/jira/browse/BEAM-5915 and the solution should be similar.
Standardize use of proxy environment settings, as in gcsio:
Issue for proxy settings: https://issues.apache.org/jira/browse/BEAM-3184