WORK IN PROGRESS: feature tree

This implements the feature tree using the new vector-api.

This is based on and replaces PR #425, which is deprecated.

Only merge this once the vector-api is pushed into master and this PR is rebased on it.