Add allocstatic/freestatic to processcontext_t

The allocstatic function will be use in every module
initialized with initionce_ called from init_processcontext.

free_processcontext returns ENOTEMPTY if static memory
has not been freed.

Also changed free_pagecacheimpl to return ENOTEMPTY in case
not all memory has been freed.

Functions initonce_valuecache/freeonce_valuecache are now
using allocstatic_processcontext and freestatic_processcontext
instead of malloc and free.
Remove sysusercontext_t

Functionality is moved into sysuser_t
sysusercontext_t is replaced with sysuser_t.
str_errorcontext now works in static maincontext

The global variable g_maincontext of type maincontext_t
is now asssigned a valid value for its error member.

Basic logging services using str_errorcontext now work
as expected even in unitialized (static) state.
Move staticmem from process- to main-context_t

The function allocstatic_processcontext and freestatic_processcontext
are renamed into allocstatic_maincontext amd freestatic_maincontext.

Static memory is now part the global g_maincontext.

----

Renamed  process_ioredirect_t into process_stdfd_t

unittest_platform_sysuser now uses process_t / init_process
instead of fork().
Add different init modes to processcontext_t

The config database C-kern/resource/config/initprocess
is changed. One column "inittype" is added to support
different initialization modes.

Type "initonce" calls the initonce_MODULE functions
as before. Type "object" replaces the standard
initialization procedure for objects.

Namely
 (init|free)once_valuecache,
 (init|free)once_sysuser
are removed and implemented in (init|free)_processcontext
with inittype set to "object".
Implement abort_thread

abort_thread either ends the calling thread or
jumps to a location marked with setcontinue_thread().
No resources are freed. Resources must be handled
from an abort/exit handler.

Implemented exit_thread which ends the calling thread.
No resources are freed. Resources must be handled
from an abort/exit handler.

Also removed function newgroup_thread which started x threads.

The function newgroup_thread was an overengineered thing
and was therefore removed. This simplified the thread module.

The lock_thread/unlock_thread were also removed.

threadpool_t was removed.
Implement atomic operations

Introduced atomic operations atomicadd_int,
atomicsub_int ... which allows to operate atomically
on integer types.

The implementation uses GCC builtin functions as long
as no C11 standard is available.
Implement rwlock_t

The type rwlock_t offers a simple many reader
and single writer lock.

The implementation uses two mutex_t namely entrylock and exitlock.
The entrylock must be acquired by every reader or writer
before it is allowed to enter the protected region.
If a writer acquires the entrylock it holds it until it leaves
the protected region. It acquires also the exitlock sets
rwlock_t.writer to itself and checks rwlock_t.nrofreader.
It releases exitlock and suspends itself if nrofreader was != 0.
If a reader enters the protected region it acquires entrylock
adds 1 to nrofreader and releases it immediately.
Thus entrylock ensures exclusive access to the protected region.

If a reader leaves the protected region it acquires exitlock,
decreases nrofreader and resumes a writer if nrofreader reached 0.
It releases exitlock. If a writer has been resumed it acquires exitlock
checks that there is no reader and then it enters the protected region
else it suspends itself again. This is necessary cause suspend and resume
are implemented with signals and it is possible that a spurious signal
is received from outside the process and therefore the writer has to check
the condition again.