Fix logbuf issues

This fixes a tailer leak, a race on the close flag, as well as a logical race that could cause some lines at the end of a log to not be read.
Is the intention here just to make the channel reads on the next line follow the StopAtEOF call?  Is there any way to do it without introducing a goroutine and a timed wait?