[api] enhance the update dirty job

having a delayed job for every dirty package just does not scale, so
let's bundle them to dirty projects and have one job per project - outside
of seldom migrations, the number of dirty packages should be low, but
migrations explode the number of dirties