Extremal problems for star forests and cliques