Transitions in symbiosis: evidence for environmental acquisition and social transmission within a clade of heritable symbionts