GBRT modifications for trees-v2

This PR will make GBRT work.

I've run a simple benchmark - its 4x slower than master for depth 1 trees and 2x slower for depth 6... I will investigate further