Identifying and comparing efficiency-loss mechanisms in Earth-abundant thin-film solar cells