Add support for waking up only a given amount of threads

This will enable Erlang to run with options 'threads' and 'smp' on OSv.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Bas Wegh <BasWegh@gmx.de>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>