apiserver: listen on localhost in tests
apiserver: listen on localhost in tests

The old newServer code listened on ":0" not localhost,
but that wasn't a problem because nothing relied
on dialing the address taken from the listener.

When the two server-starting pieces of code were consolidated
into one, we didn't change the code to listen on "localhost:0"
instead of ":0", which causes the tests to fail on Windows
where dialing 0.0.0.0 doesn't count as dialing localhost.

Fixes https://bugs.launchpad.net/juju/+bug/1466011.

marcmolla/juju,perrito666/juju,reedobrien/juju,mikemccracken/juju,frankban/juju,mjs/juju,bac/juju,anastasiamac/juju,mikemccracken/juju,mjs/juju,anastasiamac/juju,perrito666/juju,gabriel-samfira/juju,howbazaar/juju,alesstimec/juju,ericsnowcurrently/juju,mikemccracken/juju,marcmolla/juju,AdamIsrael/juju,frankban/juju,waigani/juju,mjs/juju,dimitern/juju,anastasiamac/juju,marcmolla/juju,howbazaar/juju,ericsnowcurrently/juju,bac/juju,dimitern/juju,frankban/juju,reedobrien/juju,mjs/juju,alesstimec/juju,howbazaar/juju,bac/juju,bac/juju,gabriel-samfira/juju,macgreagoir/juju,perrito666/juju,macgreagoir/juju,waigani/juju,frankban/juju,gabriel-samfira/juju,macgreagoir/juju,mjs/juju,macgreagoir/juju,anastasiamac/juju,dimitern/juju,gabriel-samfira/juju,gabriel-samfira/juju,AdamIsrael/juju,alesstimec/juju,waigani/juju,ericsnowcurrently/juju,waigani/juju,frankban/juju,mikemccracken/juju,alesstimec/juju,reedobrien/juju,reedobrien/juju,mjs/juju,mikemccracken/juju,AdamIsrael/juju,bac/juju,marcmolla/juju,reedobrien/juju,AdamIsrael/juju,perrito666/juju,dimitern/juju,howbazaar/juju,anastasiamac/juju,macgreagoir/juju,alesstimec/juju,marcmolla/juju,perrito666/juju,mjs/juju,ericsnowcurrently/juju,dimitern/juju,howbazaar/juju,ericsnowcurrently/juju