Simplified the code and reworked the NULL validation logic.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@58034 65644016-39b1-43b1-bf79-96bc8fe82c15
Rolled back my patch for CORE-2709. Reworked Adriano's solution for CORE-1188, CORE-3052 and CORE-3239. Both changes affect the stored index keys for compound indices, so beware.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@58035 65644016-39b1-43b1-bf79-96bc8fe82c15
Postfix for my prior commit.

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