completely re-do HTML writing again (with element classes)
Well I don't actually like this result as much as I thought I
would, but I spent all goddamn morning on it and I think it is
a *bit* better, so it's going up.
This implements a pretty basic generic HTML element class (so
you can create HTML elements in a Pythonic way; the class'
string representation is the HTML syntax), and a ReleaseTable
class built on top of it which constructs our result tables out
of a bunch of Element instances, based on a dict of image group
data passed in to it.
We rejig get_latests to use a slightly different format (this
all started when I came up with what I thought was a TERRIBLY
clever one-liner for producing a dict in the approximate layout
of a result table; that's more or less still in here, as the
crazy return value for the new `get_latests`), and the actual
`write_html` method gets a lot simpler as it just has to call
`get_latests` and throw the results at `ReleaseTable`, more or
less.
`_prune_data` gets simpler as it doesn't have to flatten the
latests info itself, the new `get_latests` does that for it.
Along the way we also stash the actual openQA job results for
each image in its dict, and create a new `Image.testspass`
property you can use to just ask if the tests passed or failed.
This is for a couple of reasons: I may want to link to failed
tests in some way, and it will help us abstract different types
of tests via `testspass` - so when an image is tested by auto
cloud not openQA, it doesn't matter to the HTML writer, it just
asks for testspass. It also lets us fiddle with the definition
and create special cases and stuff if we need. It also makes
`update_openqa` a lot simpler as it doesn't have to do all the
'figure out if all tests passed' work itself; turns out it's
easier to do that at the `Image` level than mucking about with
ersatz dicts in `update_openqa`.