Interactions between the developmental and adult social environments mediate group dynamics and offspring traits in Drosophila melanogaster