Add public method to get the raw response document

For debugging it can be useful to get the raw response document. Add new
method getRawResponse() that returns either a PHP array when format is
json or a SimpleXmlElement if format is xml.