Refactor mrb_obj_eq() func in object.c.
Refactor mrb_range_eq() func in range.c.
Merge pull request #1320 from suzukaze/refactor-object-c

Refactor mrb_obj_eq() func in object.c.
Merge pull request #1321 from suzukaze/refactor-range-c

Refactor mrb_range_eq() func in range.c.