The European Union began taking steps on Thursday to limit the impact of the war between Israel and Hamas on the bloc, amid heightened security tensions after a firebomb attack on a Berlin synagogue and killings in Belgium and France by suspected Islamic extremists.