Nigeria’s basic education system is straining under pressures that threaten to compromise the country’s demographic promise.