os/signal: add Stop, be careful about SIGHUP

Fixes #4268.
Fixes #4491.

R=golang-dev, nightlyone, fullung, r
CC=golang-dev
https://golang.org/cl/7546048
12 files changed