bus: automatically flush bus queue when we exit the event loop

This way, we do not have to call it manually