Spain announced the departure of Luis Enrique as coach of the national team following the team’s shock defeat to Morocco at the World Cup.