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 don't like any of those approaches :-1: .. sorry ;-)

When I proposed the counter, what I had in mind is the "last user closes it" pattern.
So:
 - `stop()` doesn't change signature
 -  Each `stop()` invocation decrements some counter atomically
 - When there are no more users, you close it for real.

I guess you could try doing the same with the dependency graph approach, although my opinion still is that it's overkill.