pipeline: Call gst_task_cleanup_all() before checking reference counts after shutdown

We have to ensure that all background threads from thread pools are shut
down, or otherwise they might not have had a chance yet to drop their
last reference to the pipeline and then the assertion for a reference
count of 1 on the pipeline fails.
6 jobs for pipeline-deterministic-clocks in 28 minutes and 36 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Preparation
passed #72276
gst indent

00:00:42

passed #72275
manifest

00:00:27

 
  Build
passed #72277
build fedora x86_64

00:03:51

 
  Test
passed #72278
check fedora

00:17:09

 
  Full Builds
passed #72279
build android arm64 api28

00:04:08

passed #72280
build cerbero fedora x86_64

00:06:25