(PDB-950) Added validation for regexps in queries

This commit adds a validation for regexps in queries as was proposed in PDB-950
If I understood you correctly, you suggests to leave this check for both DB, but don't fail PG request immediately and rather perform a query. Then if we see that query failed - generate a 4xx error (we already know that this is because of invalid regexp).
If query was ok - then we proceed this as normal request and not fail because of some of POSIX regexp features are not supported by Java regexps.
Right?

PS: Could we connect on Skype or other IM? It is easier to discuss such things there.