[bugfix,cmake] Fixes precendence issues in module path

When working with installed modules, the cmake scripts and
modules of the current module should take precendence over
any installed ones. This was not the case before this patch.

Furthermore, modules downstream in the
dependency tree should be able to overwrite tests in  modules
that they depend on. This patch more caredfully crafts the
CMAKE_MODULE_PATH to reflect the module dependency in it.
[cmake,bugfix] Fixes requiredness of module

Previously, dependencies were not correctly searched for as
required packages. This patch fixes this.