add sched_getaffinity stub and implement sysconf(_SC_OPEN_MAX)

they are needed to start Erlang Shell

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>
include/api: Migrate to upstream musl headers

Replace include/api headers that are identical with our upstream musl
version with symlinks to the musl headers. Once we have migrated all the
headers, we can make include/api a symlink to musl/include.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
apps: update to latest

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
sched: kernel threads shouldn't keep reference to any app

It is possible that an application thread causes a creation of a kernel
thread (e.g. some ZFS related ioctls tend to do that). Such threads
shouldn't keep reference to the application of the thread that spawned
them since that may needlesly defer the destructon of such application.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
runtime: Remove duplicate libintl.h include

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>