ISPN-4561 CacheManager.stop with indexing to Infinispan fails

https://issues.jboss.org/browse/ISPN-4561

As discussed, introduced a graph to store cache dependencies and enforce it at stop time, plus an API to interact with that. Query will register cache dependencies accordingly. Backporting should be straighforward.
I guess the reason the counter is not here was already pointed out in the mailing list :)

The counter strategy 'kind of' fall in the suggestion 2) above: a call to stop returns immediatelly, to make sure if the cache is stopped or not, one has to obtain the component status. With the graph plus exception approach, a call to stop either stops the cache or tells it cannot be stopped because someone else is using it.