Add out_of_memory field to mrb_state.
Add the care for malloc failed.
At the first time, mrb_realloc raise RuntimeError.
At the time fails twice in a row, it causes panic.
Merge pull request #1121 from monaka/pr-check-malloc-failed2

Check malloc failed