[BZ-981410] avoid eccessive hashtable resize when adding many tuples to memory in accumulate node
(cherry picked from commit 090a348e0abee4243e1a74b8b52fb0eb9a13a75f)