Configure travis to use prebuilt dependencies

Dependencies are now hosted in a github repository and this brings two advantages:

- Improved build time with travis since we no longer have to build each
  dependency
- Less chance of build errors due to external servers being down since Github is
  now the single point of failure
Handle special KE_EVENT case where maxlen < 3

Possible bug reported by @oni-link [here](https://github.com/neovim/neovim/pull/485/files#r11664573).

It was handled by doing a circular walk through a key buffer and saving the
index between calls with a static variable.

Also replaced some `char_u` occurrences by `uint8_t` and removed unused
headers in input.c module.
Remove 'textmode' option

'textmode' is an option obsoleted for at least 10 years in favor of
'fileformat'.
Added os_isatty
Removed mch_check_win
Removed mch_input_isatty
Replace explicit uv_guest_handle(fd) == UV_TTY by os_isatty