Don't lazily initialise mutexes

For some reason we can't seem to create mutexes before the scheduler
starts. In the meantime, move mutex creation to a dedicated function
to be called by the first task that starts.
Improve stopWithMessage and make more debug