Add Pure builtins for the Regex portion of the HSL.
Summary:
This basically moves the workarounds the HSL does around legacy regex functions (suppressing warnings, not mutating preg_last_error) below the line. This means the builtins are Pure (they neither observe nor affect the status of preg_last_error, and they don't produce warnings/errors in the logs), so we can use them to make the Regex portion of the HSL Pure (see the stacked diff for how this would look; I tested the diffs together locally).
After this diff (and the stacked one using it) make it to prod, I intend to make new HSL-friendly versions of our pcre helpers so that the workarounds pushed down into these new builtins can be removed completely.
Reviewed By: fredemmott
Differential Revision:
D25072637
fbshipit-source-id:
4dec092660cbca10595ca9e30397d3eaf5fce3ab