Toggle parser `xmlMode` if a XML declaration is seen.

- Added regex to test if the document is xml or not
- Updated comment which describes which html parser is being used
- Removed calls to force attributes to lowercase (in XML they should remain camelCase)
Add a test that the parser lowercases HTML.