Implement splitLookup and split.

I may have overlooked some opportunities to improve performance or there is another way of writing this function without walking the tree two times. If the latter is true, than i can't seem to figure it out. I say this because the function is more than ten times slower that its equivalent in the containers package.