Tree sparse imp2

This is not ready to merge yet.

This a new batch of improvements. I clean the splitter code.

I am thinking of dropping the color approach for the simpler index_to_samples approach. We would be able to drop one array, one variable. Less initialization code.The code would be easier to read and maintain. Do you see compelling argument to keep it? I have tried to benchmark and it doesn't improve much performance.