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.
If you do a getCache("name") the cache will be started. You don't do that?
But also it might be around - started by a different directory or just having a conflicting name - and this dependency might not be desirable, especially if it shouldn' t be there and you throw exceptions when closing a valid-to-be-closed Cache.