Return a CiviCRM-looking error if we hit a cURL error.

Handle cURL errors by synthesising a CiviCRM error object.

This is API so we can't depend on having CRM_Core_Error::createError() available.
Merge pull request #925 from GiantRobot/CRM-12737

CRM-12737 - Return a CiviCRM-looking error if we hit a cURL error.