The components of directional and disruptive selection in heterogeneous group-structured populations