Regex: Cache string size to improve performance for large strings in matches iterator

In the regex-dna shootout, we need to count the number of matches in a very large string. With the current state of strings, calling text.size invokes strlen. Calling strlen on this very large string every time we look for a match is very slow. By caching the string's length, the performance of this iterator improves immensely.
Should this just be `<textSize = endpos;>` to avoid another call to strlen()?