What stops the UK from revoking Article 50 simply to reinvoke it later for an additional 2 years of time to work out a deal?
Mostly the EU court of justice willingness to get creative or even political at times. It's not obvious to me that article 50 was really meant to ever be used (as opposed to placating EU skeptics during negotiations on the treaty) and it is pretty light on procedural details. Case in point the possibility to go back on the article 50 invocation unilaterally is something the court created recently, it is nowhere to be found in the text itself (but it does not exclude it either, it's just silent).
The court's role is major complaint of some Brexit enthousiasts but for now the UK is still a member and stuck under its jurisdiction. Unless it is willing to contemplate the hardest of no-deal Brexit and ignore the treaties entirely, it needs to follow the article 50 process and the court's interpretation of that process. I am not even sure British courts would contemplate breaking off with the EU in such a disorderly fashion (but I am far from a specialist on this topic).
Someone else noted recently in a comment that the advocate general suggested a slightly different wording allowing the process to be stopped “in good faith“ but the court did not retain it. However doing it in bad faith is sure to be met with some strong push back from the EU's side. Importantly, article 50 does state that an extension of the negotiation period has to be agreed unanimously by all EU member states. Effectively extending the process by cancelling and re-invoking article 50 flies in the face of this provision.
You also have to consider what the purpose would be. Reading British commentary on Brexit, you sometimes get the feeling there is only one party in all this. It's all about what the UK wants or its leverage and it can be as cynical or ruthless as it can all the while ignoring the other party's perspective and complaining that the EU is mean. But what's needed is an agreement. Tricking the EU into another two years of negotiation is unlikely to buy any good will or help find some common ground.
It's possible but timing is an issue.
The European Court ruled that it is possible for the UK to unilaterally revoke Article 50. However, if you read the Advocate General's opinion, on which this ruling is based, you can see that it says cancelling Article 50 cannot be used as part of an "abusive process".
In other words the plan could not to be cancel and then quickly re-trigger it to get another 2 years on the clock. It would have to be cancelled in good faith, i.e. with the intention of not leaving the EU. Perhaps some years later it might be possible to have another go, under a different government or with a fresh democratic mandate.