fixed memory leak in GBTrees
fixed memory leak in GBTrees

(cherry picked from commit 1b8c2589c057f862008cd1a3be5c8802b7bf1994)

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv