MSE: Relax the 'media segment must begin with keyframe' requirement

The current version of the MSE spec no longer requires that media segments
start with a keyframe. This change reworks the MSE implementation
so that it now allows tracks within media segments to not begin
with a keyframe.

To accomplish this requirement's relaxation, this CL:
1) Separates media segment signaling from coded frame group signaling:
   MSE stream parsers need to report whether or not they are currently
   in the middle of parsing a media segment, such as a WebM cluster, to
   comply with spec disallowance of certain operations like changing
   SourceBuffer appendMode when appendState is PARSING_MEDIA_SEGMENT.
   However, SourceBufferStream only needs to be signaled when a new coded
   frame group is beginning, for example when buffers are appended
   following a discontinuity.
2) Since the FrameProcessor now can transitively signal SourceBufferStreams
   when a new coded frame group is beginning (which might span multiple
   media segments), the SourceBufferStream can rely upon the fact
   that the next buffer appended must be a keyframe if it's been told
   that a new coded frame group is starting. A CHECK() is included.
3) New ChunkDemuxerTests.
4) Various test cleanup to conform to the distinct "new coded frame group"
   and "new media segment" signaling separation, as well as removal
   of decode error verification when a media segment doesn't begin
   with a keyframe.

Note that the FrameProcessor already drops non-keyframes prior to the
first keyframe processed for a track following a discontinuity,
and the SourceBufferStream already drops non-keyframes prior to the
first keyframe processed for a track following a range removal that
removed the last appended position in the current coded frame group.

BUG=229412,459546
R=chcunningham@chromium.org
TEST=Updated ChunkDemuxerTests, SourceBufferStreamTests,
FrameProcessorTests. Also locally tested: bug 459546's
original report no longer fails. A sample webm VP9 file
from b/26524063 no longer fails. GPM webm vp9/opus test no
longer fails. Bug 518854's original report's "flags_all.mp4"
no longer fails.

Review URL: https://codereview.chromium.org/1091293005

Cr-Commit-Position: refs/heads/master@{#371018}
13 files changed