merge default into bug25383
improved connection refusal logic / error message
plus some tests to go with that

And a tweak to the "become 1.0" API
merge bug25383 into default