trees: add `is_empty`, `has_key` and `length` methods to BinTree