Prime Minister Benjamin Netanyahu’s dismissal of Yoav Gallant was seen as a risky step as Israel fights wars on two fronts. Opposition leaders said the move put national security at risk.