If no order on the key is enforced in ToString, the following tree:
foo = 1
bar = "baz"
foobar = true
[qux]
foo = 1
bar = "baz"
may come out as:
bar = "baz"
foobar = true
[qux]
foo = 1
bar = "baz"
foo = 1
which is incorrect, since putting that back to the parser would panic
because of a duplicated key (qux.foo). Those changes make sure that
leaf values come before tables in the ToString output.
Nodes can be either *Toml.Tree, []*Toml.Tree, or *Toml.Value.
Arrays of trees were incorrectly wrapped in a *Toml.Value,
making the conversion functions think they were leaf nodes.