Merge pull request #657 from cenkalti/errors

refactor(errors): use map literal syntax
Add mod/lock timeout.

Added timeout goroutine to stop waiting on lock after timeout
expiration.

This necessitated reworking the flow of the acquire handler.  createNode
now _only_ creates the node; it no longer waits on the lock itself.
getLockIndex (perhaps this is poorly named) extracts out the lock
checking routine so that it can be used by "get" and "watch", both.
get() was added to instantaneously attempt to acquire a lock with no
waiting.

If a lock fails to acquire, for whatever reason, an error is returned,
resulting in a code 500 to the client.
Merge branch 'master' of https://github.com/coreos/etcd
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): no MaxClusterSize field in server.PeerServerConfig