Query: Add support for regexp queries with ~=

This fixes #124. The patch is a bit messy due to QueryLexer.java and QueryParser.java getting regenerated, but other than those two, I think it is pretty simple.