parser: add include dedup cache to handle include loops

John Johansen requested to merge jjohansen/apparmor:include-cache into master

Profile includes can be setup to loop and expand in a pathalogical manner that causes build failures. Fix this by caching which includes have already been seen in a given profile context.

In addition this can speed up some profile compiles, that end up re-including common abstractions. By not only deduping the files being included but skipping the need to reprocess and dedup the rules within the include.

Fixes: MR: Signed-off-by: John Johansen

Merge request reports