Fix incorrect behavior for small number of intervals.

Currently, findOverlapping and findContained return incorrect results if the interval tree is created from a small number of unsorted intervals. The little sanity check in interval_tree_test would fail.