ENH: remove offset calculations
ENH: use memset and memcpy when possible
ENH: make sort an inline nogil function
ENH: make node_reset/split/value gil-free
ENH: use npy_int32 type
Merge pull request #2504 from glouppe/tree-tweaks

[MRG] Small improvements to the tree code