We use glib-compile-resources to get a single html file bundled. That
seems like overkill.
Ideally, we'd use #embed for this, but that seems like it'll take a
while longer, so use a small Python script to convert the .html into C,
and compile the resulting file in the usual way.
Formerly, cockpitwebresponse would default to serving a minimalist
internally-hardcoded document for errors, unless the resource was
provided. Since this resource was provided from both -bridge and -ws,
the internal document was only used for testing. That was for good
reason: the full document would be a pain to test on, and we'd have to
update the tests any time someone modified the html.
Let's turn the logic around there and default to the real document and
give the tests a mechanism to inject their minimal one. We use a
pointer instead of a constant, allowing it to be directly overridden
from the tests, and simplifying the code in cockpitwebresponse a bit.
We tried another approach with the usual `ld -b binary` tricks to
convert the file directly to a linkable symbol, but this was causing
strange crashes on rhel and fedora. Going via C is a sure thing.