(PDB-950) Added validation for regexps in queries

This commit adds a validation for regexps in queries as was proposed in PDB-950
Hmmm... For this particular request "curl -v 'http://localhost:8080/v3/nodes/%node-name%/facts?query=\["~","name","*.foo"\]&include-total=true'" neither validate-binary-operators nor compile-user-query->sql is called, so my validation in validate-binary-operators would not work... 

What's more, validate-binary-operators does not do a tree traversal (only iterates though the expressions one level deep), which should be fixed, I guess.

I think we should fix those things. I will work on it.