Remove juju.Conn and consolidate some testing code