etcdserver/etcdhttp: split out peers and add tests

I didn't assume that; but we're only looping twice, so I didn't think the overhead of having the server running was worth considering. I can change it to the end of the loop if you want.