[r=gz],[bug=1303735] Various address logic fixes
- Unified logic for Select{Public,Internal}Address.
Now they both return the first public/private address,
or the first address with a usable scope.
- instance.NewAddress will now derive the scope of
IPv4 address from the network range. Loopback addresses
are machine-local, private network addresses are cloud-
local, all others are public.
- Now using instance.NewAddress in provider/openstack and
worker/machiner so scope derivation logic is used.
Live-tested on HP Cloud and Canonistack.
- Dropped instance.HostAddresses; it is no longer used.
- Fixed state.mergedAddresses to maintain order.
Fixes lp:1303735
https://codereview.appspot.com/85590044/