The Democrat Conor Lamb’s performance in a Southwestern Pennsylvania House race rattled Republicans and showed Democrats how to win back Trump voters.