Log error on socket open failure. Add check for session before
attempting to dereference it in opensocket() in http_curl.cc.
Closes-Bug: #1360214

Change-Id: I42327f1810d43872029a63677e4cde4b9ed9c916
(cherry picked from commit 16bc4a6fe42a5c99695ac27859fb366cf7e5881c)
Merge "Log error on socket open failure. Add check for session before attempting to dereference it in opensocket() in http_curl.cc. Closes-Bug: #1360214"