Fix couple of minor socket issues
Fix couple of minor socket issues

Set timeout and socket options on all simple sockets.  At present
some code paths can miss it, such as when the SSL certificate is
CA-signed.

Add a missing check for failure.

asfin/electrum,fireduck64/electrum,pooler/electrum-ltc,aasiutin/electrum,cryptapus/electrum-myr,dashpay/electrum-dash,imrehg/electrum,kyuupichan/electrum,lbryio/lbryum,imrehg/electrum,fujicoin/electrum-fjc,aasiutin/electrum,asfin/electrum,pooler/electrum-ltc,romanz/electrum,vertcoin/electrum-vtc,fyookball/electrum,spesmilo/electrum,cryptapus/electrum-myr,vialectrum/vialectrum,dabura667/electrum,fireduck64/electrum,argentumproject/electrum-arg,fyookball/electrum,FairCoinTeam/electrum-fair,neocogent/electrum,digitalbitbox/electrum,imrehg/electrum,cryptapus/electrum,dashpay/electrum-dash,FairCoinTeam/electrum-fair,asfin/electrum,pooler/electrum-ltc,cryptapus/electrum-uno,fujicoin/electrum-fjc,protonn/Electrum-Cash,wakiyamap/electrum-mona,protonn/Electrum-Cash,spesmilo/electrum,procrasti/electrum,fireduck64/electrum,aasiutin/electrum,pknight007/electrum-vtc,fujicoin/electrum-fjc,cryptapus/electrum,kyuupichan/electrum,molecular/electrum,vialectrum/vialectrum,kyuupichan/electrum,romanz/electrum,lbryio/lbryum,pknight007/electrum-vtc,neocogent/electrum,spesmilo/electrum,cryptapus/electrum-myr,neocogent/electrum,dashpay/electrum-dash,procrasti/electrum,wakiyamap/electrum-mona,argentumproject/electrum-arg,vialectrum/vialectrum,cryptapus/electrum-uno,pknight007/electrum-vtc,protonn/Electrum-Cash,vertcoin/electrum-vtc,protonn/Electrum-Cash,wakiyamap/electrum-mona,molecular/electrum,dabura667/electrum,molecular/electrum,wakiyamap/electrum-mona,cryptapus/electrum,digitalbitbox/electrum,spesmilo/electrum,procrasti/electrum,dabura667/electrum,procrasti/electrum,cryptapus/electrum-uno,pknight007/electrum-vtc,vertcoin/electrum-vtc,argentumproject/electrum-arg,pooler/electrum-ltc,dabura667/electrum,molecular/electrum,digitalbitbox/electrum,vertcoin/electrum-vtc,fyookball/electrum,fireduck64/electrum,dashpay/electrum-dash,cryptapus/electrum-myr,aasiutin/electrum,imrehg/electrum,cryptapus/electrum-uno,argentumproject/electrum-arg,romanz/electrum,FairCoinTeam/electrum-fair,digitalbitbox/electrum,FairCoinTeam/electrum-fair