[libc][regex] Add Kleene star and canonical AST normalisation (#233980)

Add ExprKind::Star, ExprPool::make_star, and the Kleene star Brzozowski
derivative rule D_c(R*) = D_c(R) . R* to the internal regular expression
engine. To guarantee that derivative state spaces stabilise into a
finite set of canonical AST nodes during Kleene star evaluation, enforce
right-associative canonical form in ExprPool::make_concat and
right-associated, ascending-ExprId, deduplicated canonical form in
ExprPool::make_alt.

Update parse_ere to fold concatenated atoms right-to-left in fixed
64-atom stack chunks so that right-associative concatenation stays O(1)
per step without creating orphaned intermediate prefix nodes. Wire
trailing '*' quantifiers on repeatable atoms and return REG_BADRPT for
unpreceded, post-anchor, or doubled repetition operators.

External compliance suites: Henry Spencer suite passes 71/456 (+19)
boolean/error cases and 29/456 (+13) full-position cases; AT&T testregex
passes 54/395 (+14) ERE boolean/error cases and 54/465 (+14) overall
boolean/error cases with 0 regressions.

Assisted-by: Automated tooling, human reviewed.
GitOrigin-RevId: 7550009a0c545bd052ca51ee0bb38b500dd05b24
9 files changed