Fixes a crash found with 'test-js -g' due to this object going out of scope.
This implementation closely follows the StringIterator object in that the abstract closure meant to be created in CreateRegExpStringIterator is instead unrolled into RegExpStringIterator.prototype.next.