Moved Core API's test utils to Core API module

Moved the test utilities to the Core API module because we noticed a lot of duplicate test code in the Core API itself. We couldn't use a separate module with test utilities as this would require cyclic dependencies between modules. Unfortunately, the new setup leads to the test utilities being loaded in production environments but we tried to limit strange situations by adding an explicit test package.