Moved some InMemory tests to new Tree module and deleted others

The ones I deleted were testing for bugs specific to the Perl implementation.