Convert a binary search tree to a sorted double-linked list.