This is the second fix for https://github.com/01org/dleyna-renderer/issues/69.
This is the second fix for https://github.com/01org/dleyna-renderer/issues/69.

The first fix correctly ensured that all queues were cancelled when shutting down
but unfortunately the queue cancellation code was buggy.  It could result in a
hash table entry being removed from a hash table during a call to g_hash_table_for_each.
This meant that if multiple devices were being constructed at once, not all of
the queues responsible for device construction got cancelled.  The uncancelled queues
were executing code during shutdown which lead to nasty things happening.

Signed-off-by: Mark Ryan <f16215f7acd0bd7fdc465539215bd574c785b062@intel.com>

jku/dleyna-core,KobaltRo/dleyna-core-1,UIKit0/dleyna-core,lferrandis/pkg-dleyna-core-debian,lferrandis/dleyna-core,lferrandis/pkg-dleyna-core-debian,lferrandis/pkg-dleyna-core-debian,01org/dleyna-core,jku/dleyna-core,andhe/dleyna-core,andhe/dleyna-core,rmerlino/dleyna-core,puleglot/dleyna-core,lferrandis/dleyna-core,KobaltRo/dleyna-core-1,UIKit0/dleyna-core,puleglot/dleyna-core,KobaltRo/dleyna-core,KobaltRo/dleyna-core,andhe/dleyna-core,rmerlino/dleyna-core,rmerlino/dleyna-core,d99roric/dleyna-core,01org/dleyna-core,d99roric/dleyna-core