Iraq offers to mediate between Iran and Saudi Arabia in the dispute sparked by the Gulf kingdom's execution of a dissident Shia Muslim cleric.