Public sex has always been a legally risky endeavour. But with widespread use of camera phones and social media, it’s more perilous than ever.