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.
correcting tabs and spaces

prStringPathMatch was ifndef’d out and indented with spaces rather than
tabs. I accidentally turned some of them into tabs, changing that back.
Merge pull request #1248 from sofakid/master

string: Fix regex cache init, implement firstRegex