Detect connection refused errors during API test on Windows
Detect connection refused errors during API test on Windows

The first run does not try to connect to API, as an address is not
yet saved in configuration. The second run did not recognize
corrently a refused connection.

Fixes #1661.

License: MIT
Signed-off-by: Marcin Janczyk <2b3cab7b6b0cc8e3fab6ad4a660083b5a7d1cae8@gmail.com>

llawall/go-ipfs,tswindell/go-ipfs,ipfs-filestore/go-ipfs,sroerick/go-ipfs,JustinDrake/go-ipfs,kpcyrd/go-ipfs,bconfais/go-ipfs,JustinDrake/go-ipfs,modong/go-ipfs,juztamau5/go-ipfs,ForrestWeston/go-ipfs,insionng/go-ipfs,csasarak/go-ipfs,ion1/go-ipfs,miolini/go-ipfs,modong/go-ipfs,MichaelMure/go-ipfs,mjanczyk/go-ipfs,bconfais/go-ipfs,Kubuxu/go-ipfs,RealImage/go-ipfs,thelinuxkid/go-ipfs,csasarak/go-ipfs,insionng/go-ipfs,AtnNn/go-ipfs,tswindell/go-ipfs,Kubuxu/go-ipfs,rht/go-ipfs,mildred/go-ipfs,mildred/go-ipfs,tswindell/go-ipfs,jefhe2005/ipfs,ForrestWeston/go-ipfs,peersafe/go-ipfs,chriscool/go-ipfs,llawall/go-ipfs,kyledrake/go-ipfs,WilliButz/go-ipfs,Quantomicus/go-ipfs,WilliButz/go-ipfs,Luzifer/go-ipfs,peersafe/go-ipfs,OpenBazaar/go-ipfs,moreati/go-ipfs,JustinDrake/go-ipfs,RealImage/go-ipfs,modong/go-ipfs,palkeo/go-ipfs,sahib/go-ipfs,ion1/go-ipfs,chriscool/go-ipfs,jefhe2005/ipfs,peersafe/go-ipfs,insionng/go-ipfs,thelinuxkid/go-ipfs,AtnNn/go-ipfs,thelinuxkid/go-ipfs,MichaelMure/go-ipfs,kevina/go-ipfs,RealImage/go-ipfs,llawall/go-ipfs,csasarak/go-ipfs,kyledrake/go-ipfs,Quantomicus/go-ipfs,locusf/go-ipfs,mjanczyk/go-ipfs,Luzifer/go-ipfs,shadoxx/go-ipfs,Kubuxu/go-ipfs,moreati/go-ipfs,ipfs-filestore/go-ipfs,kyledrake/go-ipfs,AtnNn/go-ipfs,shadoxx/go-ipfs,kevina/go-ipfs,Quantomicus/go-ipfs,sroerick/go-ipfs,palkeo/go-ipfs,locusf/go-ipfs,ianopolous/go-ipfs,OpenBazaar/go-ipfs,jefhe2005/ipfs,miolini/go-ipfs,palkeo/go-ipfs,kpcyrd/go-ipfs,kevina/go-ipfs,MrSparc/go-ipfs,sroerick/go-ipfs,shadoxx/go-ipfs,mildred/go-ipfs,bconfais/go-ipfs,ion1/go-ipfs,MichaelMure/go-ipfs,ipfs-filestore/go-ipfs,juztamau5/go-ipfs,rht/go-ipfs,kpcyrd/go-ipfs,mjanczyk/go-ipfs,ForrestWeston/go-ipfs,rht/go-ipfs,Luzifer/go-ipfs,moreati/go-ipfs,juztamau5/go-ipfs,locusf/go-ipfs,MrSparc/go-ipfs,miolini/go-ipfs,sahib/go-ipfs,WilliButz/go-ipfs,ianopolous/go-ipfs,ianopolous/go-ipfs,chriscool/go-ipfs,MrSparc/go-ipfs,sahib/go-ipfs,OpenBazaar/go-ipfs