More reorganization

- added comments
- changed 'mediaIndex' to 'segmentIndex' to be clearer
- moved playlist specific functions into their own file
- removed a now unneeded test (relates to videojs/video.js#1350)
[JSCS](https://github.com/mdevils/node-jscs). Been meaning to write up a config for it and jshint that can be used everywhere.