go.crypto/ssh/terminal: fix non-ASCII history.
The length of history buffer entries (which are stored as strings) was being used as the number of runes. This was correct until ff9ce887b46b, which allowed unicode entry, but can now cause a panic when editing history that contains non-ASCII codepoints. R=golang-dev, sfrithjof, r CC=golang-dev https://codereview.appspot.com/13255050
Showing with 16 additions and 3 deletions