Move MediaStreamTrack capture state handling to Document
<rdar://problem/120776008>
Pull request: https://github.com/WebKit/WebKit/pull/22575
Committed 273218@main (31557cfb95e2): <https://commits.webkit.org/273218@main> Reviewed commits have been landed. Closing PR #22575 and removing active labels.