Hamas attacks cannot 'justify collective punishment' of Palestinians: UN chief