Fix some unsafe type assertions.

Fixes issue #7.
Handle 'application/xml' the same as 'text/xml'

(Go does not fallthrough switch statements.)
Merge pull request #10 from cespare/7-xml-syntax-crash

XML and JSON crash