Simplified mutex-related code in Windows shutdown
Merge pull request #752 from bkase/mutex-simplification

Simplified mutex-related code in Windows shutdown routine r=@ochameau