FIX: calc moved size incorrectly in string/remove-char.

FIX: for Windows, now can handle widechar in multiline properly.
FEAT: added widechar support for INPUT on Linux.

FIX: incorrect flags defined for terminal on Linux.
FIX: calc moved size incorrectly in string/remove-char.
FEAT: minor code tidy up.
FEAT: added support for INPUT on MacOSX and FreeBSD
FIX: filter widechar for INPUT on non-Windows platform.
Merge pull request #816 from qtxie/new-console

FIX: calculate moved size incorrectly in string/remove-char.