red-channel: make red_client_{ref,unref} thread safe
red-channel: make red_client_{ref,unref} thread safe

These function are called on both sides of dispatcher so the
increment/decrement of the counter is done in multiple threads.
This caused the counter to not get incremented correctly and
freed the structure too early, leaving a dangling pointer in
the other thread.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1253375.

Signed-off-by: Frediano Ziglio <55d48b080b2e443e395cde84d2c83b135a4ff48e@redhat.com>
Acked-by: Christophe Fergeau <05b95054a663c388a4e33d95828cb30f0370f8ef@redhat.com>
Acked-by: Jonathon Jongsma <c7254805a17bd5c41e24c3a278fcbf3afcdfb0fa@redhat.com>

fgouget/spice,fgouget/spice,SPICE/spice,fgouget/spice,fgouget/spice,SPICE/spice,SPICE/spice