Spain survive ‘heart attack’ game against feisty Iran