ipmi: sensor number should not exceed MAX_SENSORS

Fix a number of off-by-ones, one of them spotted by Coverity.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
