Yahoo is laying off 2,000 employees as new CEO Scott Thompson sweeps out jobs that don’t fit into his plans for turning around the beleaguered Internet company.