Bug 1023179  - Fix video unloading/loading, refactor initialization

Refactor of initialization sequence, logging to track down media loading issue
maybe it's be better to use `Number.isNan` or check the `typeof`?
_Ex. `isNan` is not completely reliable, as would give false positives for strings: `isNan('something')`= true_
_also, `isNan(null)`= false_, and on line 147 (https://github.com/mozilla-b2g/gaia/pull/20501/files#diff-1f75d3935d5db95cdb2957fec7688864R147), we are calling the method without value, and operating with it after.

Or maybe I'm not understanding this properly :confused: