Provide more detail in exceptions resulting from curl errors

This pull request adds the curl error number and timing information to exceptions resulting from curl errors.