Reland of Simplify LoadableTextTrack::trackElementIndex

Count preceding sibling <track> elements in a more straight-forward way.

Also clean-up null-checks of m_trackElement while here (should be non-
null on construction and then keeps a strong reference.)

Review-Url: https://codereview.chromium.org/1980013002
Cr-Commit-Position: refs/heads/master@{#394166}
2 files changed