Add SimpleMutex class and platform specific mutex function

Add SimpleMutex class and platform specific mutex function and SimpleMutex unit test
I'd prefer to keep them all the same. But I guess it doesn't matter. I don't think it is worth putting all contributors in the (c), it would just cause more changes in all files.