Add tests for TreeNode.to_newick for single-node trees

Also simplify logic a bit in TreeNode.to_newick