Build abstraction on regex's allocation
This fixes a fuzzer crasher from a huge input (provided by Marshall), which seems to be a stackoverflow during destruction. However, I can't reproduce Marshall's crasher even before the change.
No new tests are added, but all old tests pass. I didn't really run valgrind on tests to check for memory leak, as the new allocation is basically correct by construction (only one call site uses new, no explicit delete calls).
Why auto here?
How about unique_ptr<_NodeType> instead, and then