Enable type validation for all queries (#5713)

Ricardo Lopes
2016-04-20T08:33:54+02:00

* Refactor type validation on value escape

* Fix type validation for a list of values

* Fix type validation for incomplete UUIDs

Useful for instance for fuzzy searching (e.g. the LIKE comparator),
where anything that isn't the complete UUID would otherwise fail. Accept
strings as incomplete UUIDs for those scenarios.

* Enable type validation for all queries