Make sure endOfStream is called
When the last segment in a playlist is appended, call endOfStream. There was an off-by-one error calculating when the final segment was delivered. Mock out endOfStream for test cases so exceptions aren't thrown. For #111. This commit stops the spinner from showing up when a video has finished but hitting play again to restart the video is not currently working.
Peg sinon to 1.10.2 to work around bug
1.10.3 has an issue with fake XHRs. Don't update until https://github.com/cjohansen/Sinon.JS/issues/511 is fixed.
Reset the media index to zero when the video is ended and play is called
Before the invoking the Flash tech's play(), check if the video has ended. If it has, reset the media index so that the video replays.
Reorganized videojs-hls.js to make it a bit more readable and set it up for further simplification
Merge branch 'hotfix/stream-ended' of https://github.com/videojs/videojs-contrib-hls into reorg-w-114

close #114 closes #115

Conflicts:
	src/videojs-hls.js
Merge pull request #117 from heff/reorg-w-114

Reorg and endOfStream fix