Add SimpleMutex class and platform specific mutex function

Add SimpleMutex class and platform specific mutex function and SimpleMutex unit test
You shouldn't need to put do-while (0) around the block.

Simply using the {} should be enough...