sys/malloc_thread_safety: use mutex
sys/malloc_thread_safety: use mutex

Disabling IRQs during malloc() provides mutually exclusive access and even is
safe from IRQ context, but is suboptimal for real time scenarios. Instead, the
implementation is changed to use a mutex to provide mutually exclusive access.

As a result, calls to malloc() and free() from IRQ context no longer is
possible. But this this is a really horrible idea to begin with, the impact
should be minimal and the improved real time properties of the system should
make it a good trade-off. An assert() is added to allow easy detection of
regressions and, hence, aid users to fix their code.

RIOT-OS/RIOT,OlegHahm/RIOT,kYc0o/RIOT,OlegHahm/RIOT,kaspar030/RIOT,kaspar030/RIOT,OlegHahm/RIOT,kYc0o/RIOT,ant9000/RIOT,miri64/RIOT,kYc0o/RIOT,OlegHahm/RIOT,miri64/RIOT,miri64/RIOT,jasonatran/RIOT,miri64/RIOT,ant9000/RIOT,authmillenon/RIOT,jasonatran/RIOT,authmillenon/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,authmillenon/RIOT,kYc0o/RIOT,OlegHahm/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,kYc0o/RIOT,miri64/RIOT,jasonatran/RIOT,OTAkeys/RIOT,ant9000/RIOT,authmillenon/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,OTAkeys/RIOT,OTAkeys/RIOT,ant9000/RIOT,OTAkeys/RIOT,jasonatran/RIOT,OTAkeys/RIOT,ant9000/RIOT