qtdemux: fix leak by flushing previous sample info from trak
qtdemux: fix leak by flushing previous sample info from trak

In fragmented streaming, multiple moov/moof will be parsed and their
previously stored samples array might leak when new values are parsed.
The parse_trak and callees won't free the previously stored values
before parsing the new ones.

In step-by-step, this is what happens:

1) initial moov is parsed, traks as well, streams are created. The
   trak doesn't contain samples because they are in the moof's trun
   boxes. n_samples is set to 0 while parsing the trak and the samples
   array is still NULL.
2) moofs are parsed, and their trun boxes will increase n_samples and
   create/extend the samples array
3) At some point a new moov might be sent (bitrate switching, for example)
   and parsing the trak will overwrite n_samples with the values from
   this trak. If the n_samples is set to 0 qtdemux will assume that
   the samples array is NULL and will leak it when a new one is
   created for the subsequent moofs.

This patch makes qtdemux properly free previous sample data before
creating new ones and adds an assert to catch future occurrences of
this issue when the code changes.

pexip/gst-plugins-good,pexip/gst-plugins-good,rawoul/gst-plugins-good,pexip/gst-plugins-good,StreamUtils/gst-plugins-good,chamois94/gst-plugins-good,Kurento/gst-plugins-good,hizukiayaka/gst-plugins-good,rawoul/gst-plugins-good,ikonst/gst-plugins-good,StreamUtils/gst-plugins-good,Kurento/gst-plugins-good,Kurento/gst-plugins-good,GStreamer/gst-plugins-good,hizukiayaka/gst-plugins-good,StreamUtils/gst-plugins-good,ikonst/gst-plugins-good,Kurento/gst-plugins-good,ikonst/gst-plugins-good,pexip/gst-plugins-good,GrokImageCompression/gst-plugins-good,GStreamer/gst-plugins-good,sebras/gst-plugins-good,stfl/gst-plugins-good,hizukiayaka/gst-plugins-good,chamois94/gst-plugins-good,stfl/gst-plugins-good,pexip/gst-plugins-good,Kurento/gst-plugins-good,froggatt/gst-plugins-good-m,sebras/gst-plugins-good,GrokImageCompression/gst-plugins-good,rawoul/gst-plugins-good,hizukiayaka/gst-plugins-good,ikonst/gst-plugins-good,GrokImageCompression/gst-plugins-good,stfl/gst-plugins-good,stfl/gst-plugins-good,sebras/gst-plugins-good,chamois94/gst-plugins-good,sebras/gst-plugins-good,rawoul/gst-plugins-good,GrokImageCompression/gst-plugins-good,chamois94/gst-plugins-good,froggatt/gst-plugins-good-m,StreamUtils/gst-plugins-good,froggatt/gst-plugins-good-m,GStreamer/gst-plugins-good,froggatt/gst-plugins-good-m,GStreamer/gst-plugins-good