Fix case sensitivity bug with tree iterators

With the new code to make tree iterators support `ignore_case`, there is a bug in setting the start entry for range bounded iterators where `memcmp()` was being used instead of `strncasecmp()`. This fixes that and expands the tree iterator tests to cover the cases that were broken.