Added count (for unique keys) and max to the tree.
In addition, changed the internal search function to 'search_from', and wrapped it with an external function called 'search'.
Changed the search API so that it would return the key of the node found and not the node itself, since it's much more useful.
Added the unused flag
Completely changed the implementation - now there are two 'main' trees, one by side and one by height.
Each node in the main trees contains a subtree by the height/side.
Changed the implementations of the insert and remove accordingly, removed the get_box implementation, waiting for Pavel to do that.

Stuff to think about:
 - There's a lot of code duplication. In order to resolve that we should implement a general tree that can contain subtrees.
 - The keys of all the trees contain more data than needed. All the keys here can be simple unsigned longs, representing either the side or the height.