fix invalid index error

In some situation(such as slow downloading),  (original.mediaSequence + mediaIndex) - update.mediaSequence may be < 0,
It will cause exceptions in place such as: videojs.Hls.prototype.fetchKeys = function(playlist, index)
Update videojs-hls.js
only issue endOfStream in vod mode
make jslint happy
add test for live endOfStream
fix typo
Merge branch 'master' of https://github.com/dista/videojs-contrib-hls