Binary tree to doubly linked list