Group Formation, Relatedness, and the Evolution of Multicellularity