rusticl/queue: fix implicit flushing of queue dependencies
Needed by Davinci Resolve.
There are two parts to this fix:
- flush dependencies also on flush, not just finish
- move the dependency checking logic into Queue::flush as otherwise we miss required implicit flushes.
Fixes: 8616c0a5 ("rusticl/event: flush queues from dependencies")