Check malloc failed

This fix is alternative to #1120.
In some cases, it's possible to fall in a infinite loop between mrb_malloc and mrb_raise.
We can avoid such cases using OOM counter.
But I didn't. Because such cases are too rare.