Speedup package filtering
The package filtering when using a large number of package filters (e.g. as in AthSimulation, AthGeneration) was entirely dominated by list manipulations, i.e. popping items at the front of the list.
Simplify the code so we can use plain foreach
loops. This reduces the AthSimulation package config loop from 105 to 25 seconds.
Closes ATLINFR-3847.
P.S.: Found this by running cmake --profiling-format=google-trace --profiling-output=prof.json ...
and browsing the profile in Chrome.