Fix some issues that popped up when running against HPCloud.

* Check that text/html is not actually xml.
* Always sleep and try again when rate-limited.
* Strip leading/trailing whitespaced from xml text.