[enh] Adapt yunohost_tools + backport update/upgrade function from prerefactoring branch