Client example: rework mutexes
* add a lot of commentary, including to the newly added
example of passing values to the callback.
* use a conditional variable instead of a single mutex.
This is because glib mutexes (and their underlying
default POSIX mutexes) have undefined behaviour when
trying to lock an already owned mutex from the owning
thread. As a side effect, this gets rid of the trylock
mechanism which (even though it worked) was confusing.
* fix the mutex being left locked on subsession call error.
Change-Id: I1afa973bcae57ff8c7434d2365d51893ff7696d0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>