baseparse: Don't return more data than asked for in pull_range()

Even when pulling a new 64KB buffer from upstream, don't return
more data than was asked for in the pull_range() method and then
return less later, as that confused subclasses like h264parse.

Add a unit test that when a subclass asks for more data, it always
receives a larger buffer on the next iteration, never less.

Fixes gstreamer/gstreamer#530

Part-of: <gstreamer/gstreamer!733>
25 jobs for backport-mr-427-into-1.16-baseparse-530-fix-regression in 42 minutes and 39 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Preparation
passed #6620865
gst indent

00:00:09

passed #6620864
manifest

00:00:19

 
  Build
passed #6620874
gstreamer
build cerbero cross-android universal

00:11:57

passed #6620878
gst-ios-13.2
build cerbero cross-ios universal

00:38:47

passed #6620875
gstreamer
build cerbero cross win32

00:08:35

passed #6620876
gstreamer
build cerbero cross win64

00:06:50

passed #6620873
gstreamer
build cerbero fedora x86_64

00:07:11

passed #6620877
gst-macos-10.15
build cerbero macos x86_64

00:09:08

passed #6620866
build fedora x86_64

00:06:56

manual #6620872
docker windows 1809 allowed to fail manual
build msys2
passed #6620867
build nodebug fedora x86_64

00:06:56

passed #6620868
build static fedora x86_64

00:06:56

passed #6620869
build static nodebug fedora x86_64

00:06:56

passed #6620870
docker windows 1809
build vs2017 amd64

00:06:00

passed #6620871
docker windows 1809
build vs2017 x86

00:05:51

 
  Test
passed #6621484
gstreamer
check fedora

00:03:31

passed #6620880
gstreamer
integration testsuites fedora

00:10:21

passed #6620885
gstreamer
valgrind bad

00:08:43

passed #6620882
gstreamer
valgrind base

00:08:31

passed #6620881
gstreamer
valgrind core

00:10:35

passed #6620886
gstreamer
valgrind ges

00:05:42

passed #6620883
gstreamer
valgrind good

00:10:04

passed #6620884
gstreamer
valgrind ugly

00:05:02

failed #6620879
gstreamer
check fedora

00:06:57

 
  Integrate
passed #6620887
cross-android universal examples

00:06:13