In an effort to diagnose the root cause of several deadlocks,
it seems possible that the main thread event queue can grow
to a size where it can take many seconds to drain.
This PR attempts to address this in two ways:
* Change the connection between the DisplayPlugin::presented signal and
the Application::onPresent slot to be a DirectConnection. This should
prevent the main thread from filling up with signal events.
* Within Applicaiton::onPresent use an atomic counter to prevent the main
thread from filling up with repeated Idle events.