Adds a test that shuts down leader, Reorganizes the classes a bit and introduces a builder for KafkaWriter.