Initial filtering of endpoints for public IPv4 addresses.
Simplified getting the address to return, it's always the first one.
Merge branch 'master' of https://github.com/juju/juju into api-endpoints-public-private-address
Changed comment on dependency of address order.
Merge branch 'master' of https://github.com/juju/juju into api-endpoints-public-private-address
Small test optimization.
Merge pull request #208 from TheMue/api-endpoints-only-first-public-address

api-endpoints only first public address

Currently the command api-endpoints returns all addresses. Wanted is a compatible behavior with older releases returning only one address of the API server the command connected to. This is defined by the API to be always the first of the returned addresses.

Currently the test environment only returns one local address. A more complex test simulating multiple API servers will be added later in an extra change.