Fixed 2 segfaults when using UDRs

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@60071 65644016-39b1-43b1-bf79-96bc8fe82c15
Fixed bug CORE-4565 : GDSCODE can have value = 0 in WHEN-section under some concurrent env., only in SC or CS (not in SS)

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