refactor(main): move main logic to separate package

The use case is to make it easy to embed etcd into another programs.
Currently, the only way of doing this to copy and paste the contents
of the `main()` in etcd.go.
With this commit, contents of the `main()` is moved into `Etcd.Run()`.
feature(main): add Etcd.Close() method
feat(main): add close and ready notifiers for etcd instance
refactor(main): rename Etcd.Close() to Etcd.Stop()
refactor(main): close peer server first
fix(main): fix ready notifier
fix(main): stop PeerServer on Etcd.Stop()
refactor(main): remove Etcd.StopNotify() method
refactor(main): reorder code
chore(main): add todo item and update comments
refactor(main): rename etcd.go to main.go
chore(main): add a space line between the two if statements
refactor(main): return only receiving channel from Etcd.ReadyNotify()
fix(main): remove duplicate line in etcd.go
Merge pull request #650 from cenkalti/main

refactor(main): move main logic to separate package