Add common tests for device events in STOPPED

Add tests for receiving metadata and buffering events in the STOPPED state without having called playFrom.
Also rename 'assertBuffering' to make it clearer what it does.
Make sure spurious finish buffering in STOPPED is handled
Only go to buffering from PLAYING state

So ignore any buffering events sent from the device after loading a source but before playing.
Merge branch 'new-media-api' of https://github.com/fmtvp/tal into new-media-api