Upstream: handling of upstream SSL handshake timeouts.
Upstream: handling of upstream SSL handshake timeouts.

Previously SSL handshake timeouts were not properly logged, and resulted
in 502 errors instead of 504 (ticket #1126).

firebase/nginx,firebase/nginx,firebase/nginx,firebase/nginx