rtsp-media: Fix race codition in finish_unprepare

The previous fix for race condition around finish_unprepare where the
function could be called twice assumed that the status wouldn't change
during execution of the function. This assumption is incorrect as the
state may change, for example if an error message arrives from the
pipeline bus.

Instead a flag keeping track on whether the finish_unprepare function
is currently executing is introduced and checked.

Fixes gstreamer/gst-rtsp-server#59
8 jobs for master in 15 minutes and 37 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Preparation
passed #89645
gst indent

00:00:22

passed #89644
manifest

00:00:16

 
  Build
passed #89646
build fedora x86_64

00:03:01

 
  Test
passed #89647
check fedora

00:03:28

 
  Full Builds
passed #89648
build android arm64 api28

00:03:21

passed #89650
build cerbero cross win32

00:08:44

passed #89651
build cerbero cross win64

00:06:37

passed #89649
build cerbero fedora x86_64

00:06:18