Here's a new patch.
I had to change test/etap/160-vhosts.t test to not depend on the length of the db info record return by a call to /db. I think this is fine since that's not what the vhost etap is intended to test.
I cleaned up naughty white space issues with the futon tests.
I updated the compaction code to copy the uuid over when swapping the files.
To be sure this all works I ran a test on my own machine where I copied a 0.10.0 database to my dev couch. Opening it returns a new uuid. Restarting the couch will regenerate a new uuid until a write of any kind causes the db header to be written (including a compaction) at which point the uuid persists and tracks the instance.
I also copied an old database, opened it, made an update, and then copied the same old database again and added .compact to the name. This acts like a partially completely compaction. The old .compact file is opened without a hitch and the uuid persists after compaction completes.
Looks all good to me, now. Thanks rnewson for realizing that the interaction with compaction should be checked.