exp/terminal: add SetPrompt and handle large pastes.
exp/terminal: add SetPrompt and handle large pastes.

(This was missing in the last change because I uploaded it from the
wrong machine.)

Large pastes previously misbehaved because the code tried reading from
the terminal before checking whether an line was already buffered.
Large pastes can cause multiples lines to be read at once from the
terminal.

R=bradfitz
CC=golang-dev
http://codereview.appspot.com/5542049

tav/go,tav/go,tav/go,tav/go,tav/go,tav/go,tav/go