Remove ConfigParser::Undo() hack to improve ACL flags parsing (#960)
Since `acl ... -n` support was added in commit
33810b1, flag-agnostic
parseFlags() extracts ACL flags, applies supported ones, and rejects the
rest. However, that extraction code does not apply the supported `-i`
flag! Instead, the flag is put "back" via Undo() as if we did not see it
at all. Later, the ACL data parser re-parses and applies it.
That "undo" hack avoided ACL data parsing changes but caused several
problems, including:
* The global Undo_ storage could "leak" the stored flag to the wrong ACL
on certain ACL parsing errors. The global nature of that storage also
blocked serious preprocessing/reconfiguration support improvements.
* AclData::parse() did not distinguish (previously undone and now
"redone") flags from (post-"--") ACL data, blindly assuming that the
first token is a flag and treating the remaining tokens as ACL data.
* Increasingly inconsistent handling of `-i` and `+i` flags.
* Related `ident -i` parsing code had severe performance problems: Some
tests timed out due to exponential growth of `-i` parsing delays (with
the number of parsed ACLs) caused by excessive userDataNames copying.
This change removes the "undo" hack for good. We now parse all leading
ACL options once, using a single Acl::Option API for both "global" (i.e.
applicable to the entire named ACL object) and "line" scoped options.
The parsed line-scoped flags (e.g., `-i`) are reset before parsing each
ACL directive line. They are delivered to the (ACL data) parsing code
using the existing Acl::Option linkedWith() mechanism.
TODO: This change does not fix all ACL data flag handling problems. For
example, ACL data parsing methods should be refactored to reuse the
now-generalized Acl::Option API for handling flags located _between_ ACL
parameters. Those non-trivial fixes are unrelated to Undo() removal and
will fix/improve ACL data handling, so they deserve dedicated commits.