etcdserver/etcdhttp: split out peers and add tests

Then I need to cast a couple times, but I guess it's more concise. Updated.