Added tests for GBRT stability
Compute threshold using a / 2 + b / 2  instead of (a + b) / 2 .