Fix jquery.client dependencies

Change-Id: Ia07c5b885107b8b2a42de2a6c21c31512ce5dbb3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/592
Fix ?embedplayer=yes mode, which is currently totally broken

Use the OutputPage functions to initialize ResourceLoader instead of
hand crafted js. I'm not entirely familar with the inner workings of
resourceLoader but this seems much more robust.

This also fixes some deprecation warnings.

The behaviour this fixes is severely adversely affecting reusers
of commons video.

Seems this was broken by fa5ea5be2370, but may also have had
additional causes.

Bug: 66143
Change-Id: Ie777a2f75a8a661569ee3dd25811621c9b459b80
Merge "Fix jquery.client dependencies"
Merge "Fix ?embedplayer=yes mode, which is currently totally broken"