[MAINT] Add unit tests for `Tree` data structure.

This fixes #157 (partially).

There are a few things left to do but let's merge as soon as Travis is happy. I am still not sure if it is worth keeping separating the data structure from DO-CV.

Some methods needs debugging and there are some missing features, but overall it is quite feature-complete.