Add TerminalSupported

This function returns true if line editing is available, and false if
the fallback (no line editing) will be used.
Add function TerminalMode and interface ModeApplier

These functions are provided as a convenience for the management of the
terminal input mode state. Most users of liner will never need to call
them directly.