Moved more functions from misc1.c to indent.c
Add unit tests for mch_[gs]etperm.

Use preprocessor trick proposed by @mahkoh to import 'defines' like
S_IRUSR.
Move and refactor mch_[gs]etperm to os/fs module.
Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.

* Move vim_fname from misc1 to os/fs:os_file_exists.
* Add unit tests for os_file_exists.
* Replace misuse of mch_getperm with os_file_exists.
Migrate input reading to a libuv event loop

This configures a libuv event loop running in a background thread, started with
the 'io_init' at the beginning of the program. For now it's only responsible for
reading from stdin(or stderr when vim is started on the right side of a pipe),
but this infrastructure can be reused for implementing other mch_* functions
that would require a libuv event loop.

Here's a list of changes performed:

- Move mch_exit, mch_inchar, mch_delay and mch_char_avail to the new 'io' module
- Remove unused functions in os_unix.c
- Remove hangul input support

The blocking aspect of 'mch_inchar', 'mch_delay' and 'mch_char_avail' is
emulated using a mutex combined with a condition variable, set by the thread
running the event loop.

This also removed all code that made use of the 'inbuf' static variable in ui.c
including the hangulin.c module. Hangul input is scheduled for removal from vim
(if vim is dropping support for a feature then I guess it's safe for us to
remove it too) and I had to tweak it to compile without GUI, but I should have
avoided the trouble and removed it from the beginning of the project. If hangul
input is needed we can try to integrate when we have a codebase that is easier
to maintain.
Remove stdin_stream as a module global

Use it as data passed to the callbacks. This will improve reuse of this code in
the future
Undo input buffer code removal

It shouldn't have been removed in the first place, since it's reponsible for
converting incomplete sequence into characters. A temporary helper function was
added to replace the `read(2)` call in the `fill_input_buf` function.
Refactor signal handling

This moves signal handling out of os_unix.c and into libuv event loop. The
actual handlers are in signal.c.
Set sigmask on the main thread to block signals