src/install: check basic things before starting installation
src/install: check basic things before starting installation

* checking if a destination device exists
* checking if a device is already mounted
* checking if the source image is accessible

these are all things that can be done *before* actually starting the
installation, meaning *before* we mark the slot as non-bootable and
enter the atomic procedure of updating.

It is really inconvenient to fail during installation with a failure we
could have discovered before actually starting the installation.
Instead, we can unnecessarily break a working slot the current
implementation.

Thus, all what's pre-checkable is moved into the function
pre_install_checks() here and will be executed *before* marking the slot
non-bootable in the bootloader and thus before entering the critical
(atomic) region.

Signed-off-by: Enrico Joerns <a2e5f936c390f36494e46e71bcfbe365bb1e8c49@pengutronix.de>

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