XQuery Mode bug fixes.

This pull request contains a couple of bug fixes in several parts of the xquery mode.
- Fix bug with autoclosing tag behaviour
- Fix bug with semantic highlighting synchronization
- Fix minor lexer and parser bugs