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)
I believe there was some cleanup in the compare methods but I don't believe any major changes in functionality.

The only functions here that aren't used outside of the playlist.js file are the filter/compare functions, so exposing them was more of a necessity of breaking up the code. I left the filter/compare functions exposed thinking they could be used to construct custom playlist selectors, but we can make those private if you want.