Find the byte length of an escape-aware delimited section (e.g. [...], (...)).
Returns Some(len) including the opening and closing delimiters, or None if unclosed.
The string must start with open. Quoted substrings inside are treated as atomic
(a closing delimiter inside quotes is not matched).
Find the byte length of an escape-aware quoted string (e.g. "..." or '...').
Returns Some(len) including the surrounding quotes, or None if unclosed.
The string must start with " or '.