Adding his voice to an outraged international community, David Cameron said the UN was "right" to condemn the shelling of a UN school in Gaza.