Improve sanitisation sieve; fix boolean support in queries

  - Make sanitisation regular expression less greedy (the sieve now catches injection attempts it was previously missing).
  - Boolean value support in queries now works properly (was previously being filtered by the sieve).

  - Missing test for boolean values in queries.
This tag has no release notes.