Move mouse-related settings to the separated configuration group named 'Mouse'.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Create new event handlers: Settings.Load, Settings.Save and Settings.Done

Extract code for loading/saving tty-related settings from src/setup.c
to apropriate event handlers into lib/tty module

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Move pending_keys code to different function

Signed-off-by: Slava Zanko <slavazanko@gmail.com>