Users on Windows are hitting the 1024 FD_SETSIZE socket limit

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

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59103 65644016-39b1-43b1-bf79-96bc8fe82c15
Fixed CORE-4330 and CORE-4331.

CORE-4330 - Not correct result function LAG, if OFFSET value ​​are assigned from a table.
CORE-4331 - LAG, LEAD and NTH_VALUE raise error when the second argument is NULL.

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