Terminate the read goroutine at the end of each prompt

If the read goroutine is not terminated, it reads the next character
(always on Linux, and sometimes on Mac) and then blocks forever trying
to send that character to a prompt that is never going to arrive. This
is a loss-of-data bug, and also a memory leak.

Fixes #5 for most practical uses.

There are two (not very practical use case) exceptions:
1) Ctrl-D on an empty line causing io.EOF is not handled, since the
   status of the line buffer is not in *State (although it could be
   if this was a real issue for somebody). The expectation is that the
   controlling application will stop trying to read input on any error,
   including io.EOF
2) If there is sufficient type-ahead, bytes could be stranded in the
   read buffer when State.Close() is called. There isn't much that can
   be done about this without complicating the API unreasonably.