Fix issue #823: httpclient request fails during SSL renegotiation

Set SSL_MODE_AUTO_RETRY on SSL context.