Add better logging for failed assertions in REST.php module

This adds additional logging to the REST module, so in cases where the webserver returned something that is not JSON or XML and the test failed the seeResponseIsXml or seeResponseIsJson assertion fails, we know what the webserver returned so we can better investigate the failure. 

By using the debug method it should only print additional information if requested by passing the --debug flag at runtime.