There can potentially be a lot of invalidating of the tracker cache since we call ArchiveInvalidator functions one after the other. This PR introduces a utility function that collects all tracker cache clears and calls them just once after a callback finishes executing.
It's not public API so no need to mention it 👍
fyi @diosmosis 2 tests still failing but maybe they are not due to this PR? https://travis-ci.com/github/matomo-org/matomo/jobs/489891666#L806