deal with ampersand when parsing queries

related to https://github.com/phpcr/phpcr-api-tests/pull/119 and
https://github.com/jackalope/jackalope-doctrine-dbal/issues/114
Merge pull request #89 from phpcr/fix_ampersand_handling

deal with ampersand when parsing queries