ds: add threaded binary tree operations