[media] Add a button to player to clear the playlist

Fixes #459
[media] Small fixes in javascript

My jslint vim plugin shows me some fixes for a more rigorous syntax
Fix jquery selectors, thx to @VicDeo
Merge pull request #869 from ldidry/media_clear_playlist

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