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