Add function to turn bst into doubly linked list