Bug 1005331 - JSHint fixes for shared/js/media/

https://bugzilla.mozilla.org/show_bug.cgi?id=1005331
I'm very unhappy about these changes. This was not just a matter of adding braces. You also changed else if into else,if.  It is much harder to understand the code this way.  If jshint can't deal with else if, then it isn't worth using.  These need to change back.