RTree API improvements and more tests

This change reverts the RTree API back to the original one (i.e.
insert() instead of put(), search() instead of find()), and
makes the return type of search() configurable (Array or
Object).

It also adds missing tests for type restricted search and
search() return type.