Backported the refactored database shutdown from trunk. As a side effect, it also resolves CORE-4045: Server crashes during database shutdown.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@57790 65644016-39b1-43b1-bf79-96bc8fe82c15
Support for MSVC10.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@57791 65644016-39b1-43b1-bf79-96bc8fe82c15
Added support for MSVC10.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@57792 65644016-39b1-43b1-bf79-96bc8fe82c15
Added support for MSVC10.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@57793 65644016-39b1-43b1-bf79-96bc8fe82c15
Fixed CORE-4036: Bugcheck or database corruption when attempting to store long incompressible data into a table.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@57795 65644016-39b1-43b1-bf79-96bc8fe82c15