determine XML response using Content-Type

APPENG-1456

Examine Content-Type for XML type instead of examining content for
XML declaration. If Content-Type header doesn't exist, fall back to
looking for XML declaration.

Fix test server to send application/octet-stream if response isn't XML.