TextPatternRegex.rewrite() now recognizes case-insensitive patterns and
rewrites them into more efficient wildcard/prefix/term queries.