Adding lastCallFailed method to AbstractApi to tell whether or not the last API call failed.
Created namespaced SimpleXMLElement to resolve an issue with addChild where it would not escape text properly (see http://stackoverflow.com/questions/552957/rationale-behind-simplexmlelements-handling-of-text-values-in-addchild-and-adda)