Merge pull request #13 from SaveTheRbtz/master

Misc and portability fixes
Merge pull request #14 from SaveTheRbtz/master

Faster stats, Adaptive mutexes and Coverity report fixes
v0.18.6
Merge branch 'master' into devel