agnosticbin: Fix memory leak

Change-Id: I7e5d2cda9d06af95ef218de41358d6dffa9dd288
agnosticbin: Release queues correctly when they have data

Change-Id: I7d8e697668ab61c7ad4f33836cf204eddfe84e1e
kmsloop: Fix bad read while disposing kmsloop

There was a race condition between thread termination and source
unref

Change-Id: Ic204f14761dae1e1f3205fe47c6e3c2eb5424e7a