JS binary-search-tree done (except .each)