CoW tree: Add tests for performance, refactor adding.

The refactoring is made to make tree operations more generic, so
adding, deleting and similar can be implemented using the same tree
traversal methods. This makes it possible to add balancing in only one
method.

Add tests (even though the actual depth-test is commented out) for
performance, to assure that the depth is limited.

Signed-off-by: Max Sikstrom <msikstrom@op5.com>