[MODULES-158] Add resource discovery API - Initial Draft

This proposal is a possible set of changes that makes the R5 TCK pass. Please pull and refactor at will as long as the functionality is persevered. If wanted I can migrate the test cases that I have in the framework to the modules API and add them here.