Moved TestDiscovery to core

Makes it easier to create new runners reusing the test discovery and
runner mechanisms