checksum: check for ->type being 0, not ->digest being NULL
checksum: check for ->type being 0, not ->digest being NULL

The documentation for compute_checksum says

 * If provided checksum has no type set, it defaults to RAUC_DEFAULT_CHECKSUM

but that's not how it's implemented. We check for ->digest being NULL
instead of ->type having a sentinel value (0). Fortunately,
G_CHECKSUM_MD5 is 0, and I highly doubt we would ever allow that to be
used. I'm fairly confident G_CHECKSUM_MD5 won't change in future glib
versions (due to ABI stability), but just in case, add a few static
assertions.

In the cases where we currently rely on ->digest being NULL, that comes
about because the containing object was allocated with g_new0, so we can
also rely on ->type being 0 in those cases.

Signed-off-by: Rasmus Villemoes <4a950b3c050761f138a737fe02e762ea6e8a2378@prevas.dk>

rauc/rauc,rauc/rauc,jluebbe/rauc,rauc/rauc,jluebbe/rauc,ejoerns/rauc,jluebbe/rauc,ejoerns/rauc,ejoerns/rauc