Validate HTTP API user input

For example, raft indices must be sane integers.
```go
if ev, err = waitForEvent(ctx, w, resp.Watcher); err != nil {
...
}
```