Play to the whistle
This 'play to the whistle' thing, while I agree with the principle, isn't really the key point here since the linesman saw the handball and flagged for it, albeit after the event.
In my opinion, Clattenburg is almost entirely to blame for one simple reason: he effectively plays advantage (even though he probably didn't know it at the time) but then ignores the fact that no advantage was obtained.
The linesman didn't flag straight away which caused some of the confusion, but then he probably didn't want to disrupt the flow of the game as Clattenburg would have certainly blown the whistle if he'd seen a flag being waved in that position as the value of allowing advantage is limited.
Assume that Clattenburg didn't see the handball...fine. He is playing on and wondering wtf Gomes is doing. But then when Nani has scored and suddenly the linesman starts flagging for handball, Clattenburg should simply have stated that no advantage was gained and he's bringing it back for a Spurs freekick.
Gomes had the ball on the ground...yes this was stupid...but the fact remains that the linesman saw the handball and flagged for it, therefore Clattenburg could and should have disallowed the goal.
Nani shares 0% of the blame. All he did was commit a handball offence, which happens all the time, and score a cheeky goal.
It was not necessarily a yellow card handball offence, as there is nothing in the laws to state that deliberate handball is ALWAYS a yellow card. For example...Jermaine Pennant catches the ball fractionally before it goes out of play by mistake. He deliberately handled the ball, but he did not deliberately handle it before it went out of play. Not a cautionable offence.
Even if it was a yellow card offence, this does NOT mean that the referee has to give a free kick. Yellow cards are issued after advantage has been played all the time.
what Nani done was completely unprofessional
On the contrary, it was completely professional.