etcdserver/etcdhttp: split out peers and add tests

```
 122 // int64Slice implements sort interface
 123 type int64Slice []int64
 124
 125 func (p int64Slice) Len() int           { return len(p) }
 126 func (p int64Slice) Less(i, j int) bool { return p[i] < p[j] }
 127 func (p int64Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }
```
I prefer this which is written by @xiangli-cmu 
It is clean and works for 32bit machine also.