Fixes related with CORE-3993

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@57962 65644016-39b1-43b1-bf79-96bc8fe82c15
Avoid extra atomic operations when assigning pointer to the object with pre-incremented counter (like returned from the function) to reference-counted pointer holder

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@57964 65644016-39b1-43b1-bf79-96bc8fe82c15
Fixed CORE-4084 - GROUP BY fails if subselect-column is involved.

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