Factor out `worker_thread_alive?` and `timer_thread_alive?` methods
Factor out `worker_thread_alive?` and `timer_thread_alive?` methods

This is in preparation for a future change which will add another call
to these methods and we don't want to duplicate the code.

zendesk/ruby-kafka,zendesk/ruby-kafka