Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Makes interfaces more reusable.
All outstanding goroutines now go into the etcdserver waitgroup. goroutines are shutdown with a "stopping" channel which is closed when the run() goroutine shutsdown. The done channel will only close once the waitgroup is totally cleared.