Validate HTTP API user input

For example, raft indices must be sane integers.
That "Why?" was directed at @xiangli-cmu, to be clear.