Fix "mythcommflag --rebuild" for non-HDPVR recordings.

By default, only identify IDR keyframes for h.264 recordings.
However, since DVB-S recordings may lack IDR frames, we check after
1000 frames whether any keyframes have been found, and if not, back up
and restart using the more lenient setting.

Adapted from 802e32ba4dc8852da56db170893e95cbc28637e3 and
77bf3275ef3133d81fc979ae40d9728523ff9974.