mediamanager: Fix a mutex double lock in appsrc enough_data signal
When calling gst_app_src_push_buffer, the enough-data signal could be
sent which would lock the mutex again and cause a freeze.
We unlock the mutex before calling push_buffer to ensure any signal
can acquire the mutex.
mediamanager: prevent deadlock when reading form appdata source

gst_app_sink_pull_sample() blocks until there is a sample available, but
when it arrives, gst_app_sink_render() invokes callback
appsink_new_sample(), which wants to lock appdata_mutex already held by
purple_media_manager_receive_application_data() in the main thread.

To prevent the deadlock we now check there actually are some samples
available before calling gst_app_sink_pull_sample().