cmd/jujud: avoid entering upgrade mode if no upgrade is required

This is a backport of what has already been merged in to trunk.