Ensure read-only transactions

Closes #2142
fix -Wsign-compare warnings in several grammars
Merge pull request #2304 from strk/2.3.x-readonly

Ensure read-only transactions
MinGW support for SConstruct script. Build now properly detects MinGW and finds dependencies correctly.
Properly Initialize mingwbuild variable.
Added singleton unit test to check for multiple instances across multiple dynamic libraries.
Updates for supporting 64bit MinGW build on Windows 7+ via GNU tools.
Final MinGW 64 bit enhancements for Windows 7+ and Server 2008+
Final MinGW 64 bit enhancements for Windows 7+ and Server 2008+