cmd/api: normalize byte to uint8 and rune to int32

R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/7195049