minor code tweaks.
use QMutexLocker.
Merge pull request #303 from est77/OSL_merge

OSL merge 9
Merge branch 'master' of github.com:appleseedhq/appleseed
fixed styling issues.
fixed compilation on os x.
fixed reporting of process memory size on os x.
fixed minor coding and styling issues.
fixed minor coding and styling issues.
fixed conflict with master
Fixed master conflicts.