Retry (once) on error

I did a single retry because it increases reliability sufficiently for me, but multiple retries could be done without persistent state just by using a counter for the retry param instead of a boolean.

I extracted hostname & port to methods so that I could use sinon while writing some tests of bad network connections in the code I'm writing that uses shopify-node-api.