Fix rate limit handling and logging

On rate limit event the request new request sent to the server, but
the original response returned to the caller, instead of the new one.

Other changes:
* Create http_obj in the __init__
* Fix >400 warning
* Simplify rate limit handling
* Ensure exception is raised on 413 response
* The full response body will be part of the 413 exceptions

Change-Id: I6c38c343618f92e0e79843aaa662a3d24026702b
Merge "Fix rate limit handling and logging"
Fix some issues that popped up when running against HPCloud.

* Check that text/html is not actually xml.
* Strip leading/trailing whitespaced from xml text.

Change-Id: Iddd7e40388a2a39e986fb519d3cbbf1ff9874c6f