[media] Add a button to player to clear the playlist + small code cleaning

* Fixes #459 : "Clear playlist" button to be added to media player
* small javascript code cleaning, thx to my jslint vim plugin :)