lxip: getsockname call
lxip: Free libc file descriptors upon close
libc_lxip: Correct bit count in select

Issue #902
lxip: Add timer_list functions
lxip: Check socket state before 'send'

If socket state is 'TCP_CLOSE_WAIT' set errno to 'EINTR' and return -1. Linux
handles this differently by sending the action signal.

Also change all error number to correspond with the number in BSD, and thus our
libc.