Ert 601 refactor extended test case

With this refactoring the ExtendedTestCase class can be used by code outside the ert source tree.