Validate HTTP API user input

For example, raft indices must be sane integers.
https://github.com/coreos/etcd/blob/master/error/error.go#L130-L148