Fix filter QA timing

Now that the race in filter management against config propagation is fixed, this changes the QA from a fix sleep to a delimited retry in order to make it more robust.

The first two patches refactor and introduce `retry` helper functions.
The last patch uses them.