Emergence of diverse life cycles and life histories at the origin of multicellularity