use recursive mutexes for linux implementation of CSP critial sections

CSP sometimes enters critical sections recursively, which works
on FreeRTOS but doesn't work with GomSpace's semaphore-based
implementation for other OSes.  On Linux, it's easy to fix this
by using a recursive mutex instead.

I didn't modify the MacOS or Windows implementation, so those
platforms will still deadlock in recursive critical sections.