modtermios: Add "termios" unix module, subset of CPython's.

Also provides setraw() function from "tty" module (which in CPython is
implemented in Python). The idea here is that 95% of "termios" module usage
is to set raw mode to allow access to normal serial devices. Then, instead
of exporting gazillion termios symbols, it's better to implement it in C,
and export minimal number of symbols (mostly baud rates and drain values).
unix, modtermios: Make it properly configurable; fix spelling mistake.
py: Fix bug where GC collected native/viper/asm function data.

Because (for Thumb) a function pointer has the LSB set, pointers to
dynamic functions in RAM (eg native, viper or asm functions) were not
being traced by the GC.  This patch is a comprehensive fix for this.

Addresses issue #820.
py: Add ioctl method to stream protocol; add initial modselect.
stmhal: Implement generic select.select and select.poll.
stmhal: Add polling ability to UART object.
py: Rename mp_builtin_id to mp_obj_id and make it public.
stmhal: Fix modselect so non-hashable objects can be polled.
Merge branch 'modselect' of github.com:micropython/micropython into modselect