Change destruction order of nodes in gumbo_destroy_output.

The next/prev change created a few spurious use-after-frees.  Because it
attempted to remove the node from the next/prev linked list, it required an
in-order traversal of the parse tree, where nodes are destroyed in document
order.  Otherwise, it would attempt to set next & prev on nodes which might have
been destroyed already, but whose fix-up of next/prev pointers was still pending
on the stack.

Most of the time, this worked, because a traversal of the parse tree largely
follows the order in which nodes are added.  However, when nodes are moved or
removed by foster parenting or the adoption agency algorithm, it creates cases
where they may be destroyed before their next/prev pointers are fixed by
neighboring nodes.

This change eliminates the recursive destruction and replaces it with a simple
while() loop over the next pointers.  It may also be slightly faster, although
parse tree destruction is usually not the bottleneck in parsing.  (Precise
benchmarks will have to follow later, this branch doesn't include the
benchmarking program or testdata.)