Fix uv_tty_set_mode / use cfmakeraw() when available.

The uv_tty_set_mode(tty, 1) should switch to raw mode, but currently doesn't set all the required flags. The resulting TTY is still not suitable for binary I/O.

In this patch we make use of cfmakeraw() (if available), or set the same flags that cfmakeraw() would use (taken from the glibc implementation).

I'm trying to push this change upstream for the JuliaLang fork: https://github.com/JuliaLang/libuv/pull/27