Refactor into a TopicListener struct.

Move all the topic polling functionality into a TopicListener struct to
stop passing all those variables around. Just keep them together.

Add termChans and hupChans to FileLogger to fix the bug wherein a single
goroutine would swallow the term/hup signal.