juju bootstrap: fixes lp:1392390

Fix for loop used for maas availability zone selection.
Add tests for maas availability zone selection.

Bug: https://bugs.launchpad.net/juju-core/+bug/1392390