etcdserver: add publish func

for #1094 
how about
```go
switch err {
case nil:
...
case ErrStopped:
...
default:
...
}
```

}