Make mutex_t working inter process

Set pshared attribute to true during init_mutex
  attribute pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED) ;
this makes mutex_t working between processes.
Implement thrmutex_t -- inter thread mutex

This mutex uses atomic integer operations.
All behaviour and the features of thrmutex_INIT are defined and
not dependent on the implementor of pthread lib or any other library.

--
Adapt waitlist_t to use atomic lock instead of mutex_t.
--
Adapt rwlock_t to use atomic lock instead of mutex_t.
--
Add atomic lockflag to thread_t which allows to resume
threads faster. Threads no acquire their own lockflag
without using the atomic lockflag of the synchronization
object which would serialize all wakeup operations.