ISPN-3583 When indexing is enabled but Query module isn't available configuration validation should fail

This is Sanne's PR + 2 additional commits: 
1. a fix for the classloader being used
2. Throw exception also for legacy config.

WARNING: no 2 is debatable. Not sure if it's OK to fail if config is wrong, maybe a lenient warning is preferable, this being a legacy configuration. @mmarkus I believe the check was first added by you. Is it ok to turn the warning into an exception?

Please integrate in master.
Jira: https://issues.jboss.org/browse/ISPN-3583
Corresponding server PR: https://github.com/infinispan/infinispan-server/pull/170