Moved to JUnit4 and added support for persistent emulator

Instead of starting and stopping the emulator for each test which is too
slow, we keep the same instances running. It is the task of the @Before
method to put each emulator used in a known state.