Validate HTTP API user input

For example, raft indices must be sane integers.
And it seems like slightly more verbose code isn't a bad thing if it disambiguates things.