The mayor went three for three on endorsements as challengers from the left ousted a pair of congressional incumbents.