cmd/jujud: reattempt api.Open if IsCodeNotProvisioned

There is a race between the machine agent starting and
the provisioner recording its instance ID in state.
We modify the agent's logic around opening API
connections to retry for up to one minute if it receives
an error satisfying IsCodeNotProvisioned.

Fixes https://bugs.launchpad.net/juju-core/+bug/1345014