More pause points

* More places where execution can pause when space is entered. Changing sync
  mechanism for this from semaphores sem_* (POSIX 1003.1b) to pthread_mutex*
  as is it happens to make more sense in this case as semaphore is mostly
  useful when several threads are to enter a section, mutexes are the quite
  the opposite.

* Some minor error-logging adjustments.

Some minor adjustments
Use external mqueue instead

Will now run on Android & Chrbuntu also

Needs linking into tree from this project:

https://github.com/mambrus/clib-mqueue

Known issue:
Some sort of configuration would be nice. Auto-tools will not be available
for Android builds, but some sort of auto-detection will be necessary or
developers will curse. Suggesting detecting existence in build-time for
real Makefiles and static configuration for Android.