Keep comments in capa XML from causing failures

Comments (and processing instructions!) are handled oddly in lxml.
This change will keep them from causing failures.  They will be omitted
from the HTML generated, which is fine, since they aren't needed there.
A test that our XML-comments fix works.
Check extension rather than mimetype
Merge pull request #819 from edx/jkarni/hotfix/gzip-mimetype

Check extension rather than mimetype
Merge pull request #816 from edx/hotfix/xml-parsing

Hotfix/xml parsing