cmd/jujud: don't enter upgrade mode unnecessarily

Don't enter "upgrade mode" (thereby restricting API logins and delaying worker startup) if the current software version is the same as the upgradedToVersion in the agent configuration.

In addition to the automated tests included with the PR, this change has been manually tested under a variety of scenarios.