Use a channel close to kill goroutines.

This tidies things up nicely, especially in some of the tests.
Give each handler its own copy of *Line.

Thanks to Kevin Ballard for the suggestion.