etcdserver/etcdhttp: split out peers and add tests