go.crypto/ssh/terminal: fix crash when terminal narrower than prompt.
go.crypto/ssh/terminal: fix crash when terminal narrower than prompt.

Previously, if the current line was "empty", resizes wouldn't trigger
repaints. However, the line can be empty when the prompt is non-empty
and the code would then panic after a resize because the cursor position
was outside of the terminal.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/158090043

isislovecruft/go.crypto,isislovecruft/go.crypto