playbin: bounce about-to-finish and playing stream events to main thread

We need these to happen on the main thread so code dealing with eos
and playing-stream signals elsewhere can assume it's safe to do things
that would previously have required taking the gdk lock.

Since playbin only guarantees gapless transitions if the next track is
set before returning from the about-to-finish handler, use a GCond to
block until the idle handler has run.
player: ensure all signals are emitted from the main thread