Bugfix/switch branch reinstall
Improve and refactor switch-branch
This makes versions usage possible (fixes bug that caused reset back to branch mode) and also makes switch between branches more resilient.
This was pretty much for free with Modes added in Updater version 64.0 that were originally needed for Turris 3.x migration.
@jschlehofer please review package refactor
@vmyslivec please can you review switch-branch shell script
@mprudek you have seen some lua in updater by this time. Can you potentially review lua script for updater here?
related to turris/turris-os-packages#561