matroska: Provide audio lead-in for some lossy formats

Various audio formats require an audio lead-in to decode it properly.
Most parsers would take care of it, but when a container like matroska is
involved, the demuxer handles the seeking and without its own lead-in
handling would never even pass the lead-in data to the parser.
This commit provides an initial implementation of that for audio/mpeg,
audio/x-ac3 and audio/x-eac3 by calculating the worst case lead-in time
needed from known samplerate, potential lead-in frames need and the
maximum blocksize possible for the format (as we don't parse that out
exactly in matroskademux) and seeking that much earlier in case of
accurate seeks. This is especially important for NLE use-cases with GES.

If accurate seeking to a position that happens to have a video keyframe,
it'll go back to the previous keyframe than needed, but with typical
video files that's the best we can do anyway without falling back to
scanning the clusters, as typically only keyframes are indexed in
Cueing Data.
If the media doesn't have a CUE, then we bisect for the cluster to seek
to with the same modified time as well in case of accurate seeking,
ensuring sufficient lead-in. This code path is typically hit only with
(suboptimal) audio-only matroska files, e.g. when created with ffmpeg,
which doesn't add a CUE for audio-only mkv muxing.
19 jobs for matroskademux-audio-leadin in 64 minutes and 45 seconds (queued for 1 second)
Status Job ID Name Coverage
  Preparation
passed #417969
gst indent

00:00:30

passed #417968
manifest

00:00:40

 
  Build
passed #417975
build cerbero android universal

00:18:05

passed #417976
build cerbero cross win32

00:11:17

passed #417977
build cerbero cross win64

00:07:32

passed #417974
build cerbero fedora x86_64

00:07:37

manual #417979
gst-ios-12.2 allowed to fail manual
build cerbero ios universal
passed #417978
gst-macos-10.14
build cerbero macos x86_64

00:06:49

passed #417970
build fedora x86_64

00:08:32

passed #417971
build nodebug fedora x86_64

00:07:49

passed #417972
build static fedora x86_64

00:13:51

passed #417973
build static nodebug fedora x86_64

00:09:56

 
  Test
passed #417980
check fedora

00:05:31

passed #417981
integration testsuites fedora

00:27:09

passed #417983
valgrind bad

00:19:37

passed #417984
valgrind ges

00:04:54

passed #417982
valgrind good

00:08:22

 
  Integrate
passed #417985
android universal examples

00:09:02

passed #417986
documentation

00:04:55