fix type mess by using stdint.h types

there was a plethora of uint, uchar, ushort etc macros used,
which caused build issues in a number of cases, for example when
compiling against musl libc.
the current code is saying
"if android then do_right_thing; else do_obsolete_thing; fi"
i changed it to "do_right_thing"

sys/termios.h is obsolete, POSIX defines that it's just termios.h, and all major libcs just use sys/termios.h as a forwarding
http://git.uclibc.org/uClibc/tree/include/sys/termios.h
http://git.musl-libc.org/cgit/musl/tree/include/sys/termios.h