[JENKINS-48365] Install detached plugins when upgrading Jenkins past the version the plugins were detached (cherry picked from commit 968b6adf)