Make seeks faster for slow decoders / large keyframe distances.

Exact seeking for HD-PVR recordings can be notoriously slow because
the keyframe distance is 128 frames and decoding (even GPU hardware
decoding) is often little faster than real-time.

In most cases, it's a much better user experience to make a less
accurate but much faster seek to the preceding keyframe.

There are two changes:

1. Impose a maximum wall-clock time on the forward frame-by-frame
seeking.  After this maximum time elapses, abort any further frame
seeking.

2. In addition, try to predict whether fully accurate seeking will
complete within a reasonable time, and if after a few frames it seems
hopeless, just don't bother seeking any further.

This approach allows fast decoders and video formats amenable to fast
decoding to continue to have exact seeking.

Fixes #12004.
(cherry picked from commit 33acfaf30747592b9fca0913b2c2f8832418d618)