return index for end when the time is beyond the last segment

This makes isMediaFinished work for streams that allow video.currenttime
to go beyond the last segment's t + d.
fix issues

1- BufferController was not detaching from the FragmentController
correctly
2- BufferExtentsions init method was never called. Further, the init
method was not a good fit given that representations switch.
Update WAMS urls to CDN