get rid of shadowing variables (mrbgems)

Mostly renaming, except that the definition of struct accessor methods
is now done in a new function.
fix strict aliasing rule violation
Merge pull request #2586 from cremno/fix-strict-aliasing-rule-violation

fix strict aliasing rule violation
Merge pull request #2585 from cremno/get-rid-of-shadowing-variables-mrbgems

get rid of shadowing variables (mrbgems)
refactor MACRO to avoid local variable name conflict; ref #2585