Add a ref count mechanism to deal with situations where a Shared Queue is acquired but never bound by any of the node, thus causing leakage
Add a ref count mechanism to deal with situations where a Shared Queue is
acquired but never bound by any of the node, thus causing leakage

To be honest, this area requires further work. The way things are currently
setup, producer and consumers all bind to a shared queue, but only producer
eventually unbinds. The implementation has logic to wait out for consumers
before destroying a shared queue. While this is okay, a more defined entry and
exit points are required for producer and consumers.

The code also today relies on timeouts to handle the case where a consumer
never binds to a shared queue, thus causing large delays. These delays are more
prominent for very short queries.

zeroae/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl