ssh/terminal: simplify defer

Directly use unix.IoctlSetTermios and windows.SetConsoleMode instead of
wrapping them with a closure.

Change-Id: I6309253fbb6e59e029424273b48aaa608873ea17
Reviewed-on: https://go-review.googlesource.com/99455
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2 files changed