Add support for `(?<name>expr)`.

This follows https://github.com/golang/go/commit/ee61186 to some
extent. I took the opportunity to simplify the parsing logic and
also fixed a bug in `Regexp::Equal()` that had gone unnoticed...

Change-Id: I90abec942d39b02a1c6d1ac95cd3b1cc66ec7b2a
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61690
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
5 files changed