CI: factor out rulesets_upgrade.sh
Make testing ruleset upgrade from the previous version a separate script.
Make testing ruleset upgrade from the previous version a separate script.