libc: implement pause() and select() with nfds=0 and timeout=NULL

Erlang's main thread use select(0,NULL,NULL,NULL,NULL) to sleep forever.

Signed-off-by: bhuztez <bhuztez@gmail.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>