Merge pull request #85 from eile/master

Fix some deprecation warnings, Work for Eyescale/Collage#40, Thread improvements
Byteswap for unsigned long to satisfy clang on OSX
Merge pull request #86 from tribal-tec/master

Byteswap for unsigned long to satisfy clang on OSX
Disable deprecation warning on ScopedMutex