string: Fix regex cache init, implement firstRegex

Initializing regex cache list re_list in the constructor fixes memory
corruption under heavy use.

firstRegex is a new primitive string method to quickly return the first
match without finding all of them. Motivation is for building
tokenizers.