Updated API requestor behavior on curl error

Updated the API Requestor to handle curl errors differently, removed duplication of setup up methods in test of shipment and rate.