Convert binary tree to double list