Changed registerMock and deleteMock methods

Both methods now reset all modules that depend on the mocks being registered / reset. Needs to be done because if a module has already been initialised, the mock will not be used.