FEAT: added a buffer to avoid flickering in INPUT.

FEAT: code refactoring for input.red
FIX: now search combining-table correctly.
FIX: [INPUT] free memory before remalloc a new one.
Merge pull request #827 from qtxie/new-console

FEAT: added a buffer to avoid flickering in INPUT.