Add some partitioning structures and modify the `Implicit` trait.

This adds quadtree/octree computation.
This splits the `Implicit` trait into `HasMargin` and `Implicit` to avoid unconstrained type
errors.