Validate HTTP API user input

For example, raft indices must be sane integers.
Why do this rather than just 

```
err := r.ParseForm()
if err != nil {
    ...
```