edit: fix realloc bug

We should check the return value of realloc before use it.
edit: don't use RTGUI_EDIT_{SHIFT,CAPS} to record the shift/caps key

There is no need to record shift/caps key in edit. We should make use of
the ekbd.mod.
edit: refactor the numlock handling
edit: fix the caps + shift handling
rtgui: fix a bug in RTGUI_KBD_IS_SET_CTRL