Fix lack of locking in libc which was causing memory corruption

In libc.h there was an optimization which disabled locking when there
is only one thread. It was using 'threads_minus_1' field from struct
__libc. In OSv this field was always 0, so there was no locking.

It was causing memory corruption when running apache benchmark against
tomcat in OSv on SMP. This patch makes them go away.

The fix is to always lock as in OSv we always have more than one
thread.

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