Fix ParseElementHeader to support 0 payload elements

Cherry-pick'ing Change 5c83bbec9a5f6f00a349674ddad85b753d2ea219
from upstream. This fixes regression in some edge cases for mkv
playback.

BUG=26499283

Change-Id: I88de03219a3d941b6b2f251d384e29c36bdd4d9b

const CuePoint* Cues::GetLast() const {
 if (m_cue_points == NULL || m_count <= 0)
 return NULL;

 const long index = m_count - 1;

 CuePoint* const* const pp = m_cue_points;
 if (pp == NULL)
 return NULL;

 CuePoint* const pCP = pp[index];
 if (pCP == NULL || pCP->GetTimeCode() < 0)
 return NULL;

 return pCP;
}

const CuePoint* Cues::GetLast() const {
 if (m_cue_points == NULL || m_count <= 0)
 return NULL;

 const long index = m_count - 1;

 CuePoint* const* const pp = m_cue_points;
 if (pp == NULL)
 return NULL;

 CuePoint* const pCP = pp[index];
 if (pCP == NULL || pCP->GetTimeCode() < 0)
 return NULL;

 return pCP;
}
