Use suitable types for variables.

We are better to use mrb_int as possible. And also size_t for some C99 standard library functions.