Add MediaStreamTrack.ended promise

I took a stab at the various failure conditions, mirroring them on getUserMedia as much as possible.

http://htmlpreview.github.io/?https://raw.githubusercontent.com/jan-ivar/mediacapture-main/ended/getusermedia.html#life-cycle-and-media-flow