ISPN-4464 Unify test suite for remote and embedded DSL based query tests

* Fixed test so it will properly close cache manager and continue build
Generate the component metadata file in the generated-resources directory, so that it doesn't force a recompile of the module every time.