Revert "[TextEditor] Height tree uses now the avl tree implementation."

This reverts commit 99000c2f0ef24028648f62a787e6f9eceeb1c033.
Revert "[TextEditor] Segment tree is now using the avl implementation."

This reverts commit 5280d6a0cd52513c8c0c6d865e9fcb2606b964c7.
[TextEditor] Compressing tree list now uses red-black trees again.