latency: fix custom event leaks

If the element before the sink needs $n buffers to produce one output
buffer, we were reffing $n events and unreffing only one.
Prevent this by using g_object_set_qdata_full() to handle the event
unreffing so we're sure no ref will be lost.
21 jobs for backport-mr-217-into-1.16-latency-leak-master in 67 minutes and 58 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Preparation
passed #502898
gst indent

00:00:35

passed #502897
manifest

00:00:39

 
  Build
passed #502904
build cerbero android universal

00:25:25

passed #502905
build cerbero cross win32

00:08:30

passed #502906
build cerbero cross win64

00:10:37

passed #502903
build cerbero fedora x86_64

00:07:50

passed #502908
gst-ios-12.2
build cerbero ios universal

00:34:26

passed #502907
gst-macos-10.14
build cerbero macos x86_64

00:06:47

passed #502899
build fedora x86_64

00:07:19

passed #502900
build nodebug fedora x86_64

00:11:34

passed #502901
build static fedora x86_64

00:14:04

passed #502902
build static nodebug fedora x86_64

00:12:41

 
  Test
passed #502909
check fedora

00:07:02

passed #502910
integration testsuites fedora

00:08:47

passed #502915
valgrind bad

00:16:39

passed #502912
valgrind base

00:19:40

passed #502911
valgrind core

00:24:15

passed #502916
valgrind ges

00:09:21

passed #502913
valgrind good

00:23:51

passed #502914
valgrind ugly

00:01:42

 
  Integrate
passed #502917
android universal examples

00:08:33