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 would say this is a SWF issue. The `loadedmetadata` event here is more accurate than anything Flash could be inferring based on the NetStream.