Generalize IndexSamplingJobQueue

- fix pollAll semantics to return values wrt insertion order
Merge pull request #3517 from davidegrohmann/2.2-sampling-controller-ref

Generalize IndexSamplingJobQueue