luci-app-attendedsysupgrade: fix branch detection
The running branch determines which upgrades are suggested. A jump to a
newer branch (e.g. 19.07.8 to 21.02.1) is only suggested if the advanced
mode is enable, since it may break the router.
OpenWrt versions end in either `-SNAPSHOT`, `.X-rcY` or `.x`. All these
suffixes are removed, resulting in the branch name.
Previously the `-SNAPSHOT` suffix wasn't removed resulting in wrong
branch names.
Also clean up some log spam.
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit
85e9ee31239c4e912613005f4c222f13c34e9a36)