rework image cache logic so that it works without the presence of a build script (#155)
rework image cache logic so that it works without the presence of a build script (#155)

In that case, pre-dev and dev images are not generated at all anymore, so that cache images are
not generated every time; note that this means that pre-dev and pre-inst images currently need to
be manually removed to be re-generated.

Fixes #143.

I my build-less case i used the mkosi.postinst to perform the actual customizations, and in that case 
the image caching was not used and it took way longer. With these patches the postinst is applied to 
the mediacoder-image.raw.cache-pre-inst cache image, speeding up the process.

I use the postinst script to create users, enable/disable services, setup locale, install custom prebuilt 
packages. Rebuilding the base image is pretty slow, so i think it is still useful to support -i without 
caching (ex: for producing distro spins).

[zj: add commit message based on comments in the PR]

UbiCastTeam/mkosi,UbiCastTeam/mkosi,systemd/mkosi,systemd/mkosi