Add a new simpler test, amend debugging info
Ah, that's what I was missing

When I reload the build description, the new builder.db has an
empty set in its builder.db.just_pulled, so if I want it to have
memory of the early value of just_pulled, I need to reinstate it
"by hand".

Which is obvious and so icky.
Make test_basics work again

(and fix some things which appear to have bit-rotted)
Better label sorting

Label sorting (a) now uses __eq__ and __lt__, instead of __cmp__
(which is how we're meant to do it these days), and (b) now sorts
domain names properly, consonant with utils.sort_domains().

And there is a little mild testing of that latter.
A little more testing, a little tidying
A better solution for total ordering
OK, that *was* a stupid bug

Writing the Label __lt__ method correctly makes it work so much
better...
Some progress, stopping for the day now

(test still broken)