Implement fair queueing for Loose FKs

The following discussion from !69165 (merged) should be addressed:

  • @ahegyi started a discussion: (+2 comments)

    Maybe we should shuffle the tracked tables so the processing will not be clumped by a large deletion. Example:

    1. Normal operation, low number of deletes.
    2. Sometime later a large project is deleted with millions of ci_builds.
    3. No other tables will be processed until the millions of ci_builds records are cleaned up.