use `stack_type` instead of raw `unsigned int`
allow method definition in cmdarg

save cmdarg_stack and isolate command argument state from outer scope
to allow method definition in cmdarg

import from ruby/ruby@04bb9d6b75a55d4000700769eead5a5cb942c25b
Merge pull request #2096 from nobu/def_in_cmdarg

Def in cmdarg