bsd: set a smaller default stack for BSD threads.

All threads created through the bsd/porting/kthread interface are threads that
used to be kernel threads in BSD, which means they are expected to use less
stack. Although I have no idea what is the default stack size for BSD, in Linux
things need as little as 4k. More importantly, they are threads whose memory
usage are under our control, and we could fix heavy offenders without a
problem.

If we don't say anything, they will start with 64k which is way, way, too much.
I am proposing here we go lower and get to 16k - which is even still quite
conservative, but so am I.

Measuring memory before and after the mount - because ZFS is currently our
heaviest user, I can save around 7Mb with this patch.

Passes make check (except for tst-kill, which is broken AFAICT) and misc-fs-stress.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tst-kill: fix crash

tst-kill runs various signal handlers, which we run in separate threads.
When the test completes, we may be unlucky enough for the last signal
handler to still be running, at which point when the module's memory
is unmapped (e.g., in test.py -s each test is unmapped when it ends)
we can get a page fault and a crash.

This patch sleeps for a second at the end of tst-kill, to make sure that
the signal handler has completed; This sleep is a bit ugly, but I can't
think of a cleaner way - Posix provides no way to check if there's a
running handler, and I wouldn't like to add a new API just for this test.

Fixes #249.

Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Print number of threads in 'osv info threads'

The id of the last thread might mislead people's thinking about
the number of threads in OSv, so let's simply print the nr after all
threads were already printed.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>