Handle files where only some of the frames have valid timestamps

Previously the lavf indexer assumed that if the first frame had a valid
timestamp, all subsequent frames would have a valid timestamp of the
same kind, but that is not always the case, so fall back to calculating
the PTS from the duration even if a valid PTS was seen previously.

Closes #165.