Inter-Cagliari tense four-goal thriller