Merge pull request #172 from grissiom/rtt-next

kernel: fix compiling error when RT_DEBUG is not defined
kernel: mutex could only be released in thread context

Mutex has the idea of ownership, only the thread which owns the mutex
can release it. So rt_mutex_release could only be called in thread
context.  Add a debug guard to it.