Improve normalized query parsing.

Now supports "INTERVAL ?", "SET x = ?" and "WHERE ?=y".