Make Kafka SynchronousConsumer shutdown properly

When the service shuts down, we should wait for messages to complete
processing, including any in-flight messages. This is configurable via
the `shutdownGracePeriod` option.