Rename sys_file_t into sys_iochannel_t

A new type iochannel_t is introduced which encapsulates
a filedescriptor. file_t now is an alias of sys_iochannel_t
instead of sys_file_t.

Some of the functions of file are refactored into iochannel_t.
Add thread_id to type threadcontext_t

This id will be used in log output.
The main thread has always the id 0.
(Will be changed to 1, cause unitialized main thread will get number 0).