Fix bugs in XQuery lexer. Add safeguard to avoid infinite loop in the XQuery lexer.
Merge pull request #1296 from wcandillon/master

XQuery Lexer Improvements