fix off-by-one error in String#rindex(fixnum)

I think null-terminated string should not be included in search targets.