The Hgfs server manager interface assumes that it is called only once
for each application that uses it. However, in the tools services there
are multiple clients. Hence, the initialization is done multiple times
and causes the previous initializations which allocate resources to be
overwritten and lost. Thus memory is being leaked.
Initialize the policy shares once on the first register and cleanup
the policy shares on final unregister by introducing a reference count.
The channel is already reference counted and initializes the channel once.
However it is necessary to call the channel init on each register
and exit on each unregister as it saves a channel reference in the data manager
object passed to it by the caller for subsequent retrieval.
Add an additional log to the policy init and cleanup calls for tracking purposes.