Add item refinement to the kdtree.
To improve the quality of kdtrees for tripoly meshes we would like to implement triangle splitting. Mesh triangles that straddle the split plane are split at that plane and their bounding boxes recalculated on either side of the split. This results in tighter bounding boxes and therefore subsequently better spatial subdivision (mainly via reducing the level of box overlap).
To support this in the kdtree - which is a generalised algorithm in raysect - we desire a general solution. The proposed solution is to add a method to the kdtree Item classes: cpdef refine(split, bounds). This method returns two new items, with recalculated bounds either side of the split. A default implementation would be provided that simply returns the existing item (self) for the two sides.
The tripoly mesh kdtrees will subclass Item and implement refine.