IMPALA-1410: accept "single character" character classes in regex functions

In Impala 2.0, we switched from using boost's regex library to the RE2
regex library. When using boost, we were passing posix_match to the
matcher, but that just affects the matching rule (i.e. use leftmost
longest), not the syntax of the regex itself. So we were accepting
perl-style regex with boost.

With RE2, POSIX mode restricts the syntax to egrep like syntax which
does not include a lot of the perl style things like \d.  Fix this by
setting the leftmost longest match option explicitly rather than POSIX
mode.

Note that there are still some incompatibilities with earlier versions
of impala (i.e. ones that used boost regex). Some notable examples (not
a comprehensive list):

^ and $ now match only begin/end of buffer, not begin/end of each line
(this behavior can be overridden in the regex itself using the m flag).
(This behavior is a side-effect of this patch.)

. does not match newline (this behavior can be overridden using the s
flag).

\Z is not supported.

< and > start of word, end of word is not supported.

Lookahead and lookbehind is not supported.

Change-Id: I61ee43efb55c1ca60bcb79664d2cf6e846e1485d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4958
Reviewed-by: Daniel Hecht <dhecht@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 80b04879a98974a09c7bae5f63bbfdd4787e9fdf)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4982