regcomp.c: Optimize EXACTFish nodes without folds to EXACT
Often, case folding will be applied to the entire regular expression
(such as by using "/i"), but there will be components in it that are the
same, folded or not. These components could be represented as EXACT
nodes with no loss of information. The regex optimizer is then able to
apply more optimizations to them than it could otherwise, and pattern
matching will execute faster.
This commit turns any EXACTFish node (except those under locale rules,
whose folding rules are not known until runtime)) that contains entirely
unfoldable characters into the equivalent EXACT node.
This optimization brings up the idea of possibly splitting an EXACTFish
node that contains a sufficiently long contiguous string of non-folding
characters into the portions that have folding and the portions that
don't. That might or might not be beneficial; I'm not undertaking the
experiments to check that out.