Setting start position on a live stream

Live start position should be 30s before live, not at the beginning of
the stream playlist.
Using segment length (not average) to snap to live

Counts segments using their individual duration to look back 30s from
live to set video start position
Adding a null check on the playlist

Some unit tests were failing when selectedPlaylist.segments was
undefined.
Live start time tweaks & tests

Adding a test for live start position and tweaking some of the code
Adhering to code style

Some syntactic changes to better align with code style standard
Correcting live first segment

Start time was going back one segment too far due to an array indexing
error
Solving the hang on transition issue

Addressing the issue where video playback would hang when transitioning
to a different quality stream with a large discontinuity in media
sequence.
Correcting for failed tests

Some tests failed in the previous build, mostly due to syntactic
errors. Also restored a section of code in translateMediaIndex whose
absence made a test fail.
update.duration was sometimes undefined

Removing the update.duration === Infinity check. We shouldn’t be
getting so out of sync for static playlists anyway.
Merge pull request #184 from bc-bbay/master

Setting start position on a live stream