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.
mm so if we throw an exception here, that implies the users who are stopping their own caches, will need to either:
 - understand and apply the dependency graph
 - handle exceptions.. and then what?

Doesn't look like a nice API from user POV.