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

...es/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 <mark.d.ryan@intel.com>