U.N. says it will "reduce its footprint" in Gaza after a deadly Israeli strike on its compound and the cutoff of aid.