ssh/terminal: add GetState and make ReadPassword work in raw mode.
ssh/terminal: add GetState and make ReadPassword work in raw mode.

GetState is useful for restoring the terminal in a signal handler.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/6990043

ebfe/terminal