state: only update API host ports if changed

If the API host ports haven't changed, don't
update them. This avoids spamming the transaction log
with unnecessary writes.

Fixes https://bugs.launchpad.net/juju-core/+bug/1345832
Sorry, that was a typo - should have been

	...
		if i == 0 {
			txnRevnoExpected =  revno
		}
	...

But I guess this can be ignored - it's simply that mgo/txn does not make guarantees about txn-revno being incremented by 1 on each op.