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 see a need for type safety here, any type of cache can depend on any type of cache.

If we added a method with `Cache` parameters users might wonder whether they can use caches from different cache managers, but I think that's pretty clear if they can only pass in the cache names.