Israel and Iran have traded fire in retaliatory strikes that threaten to drag the wider Middle East back into a regional war.