A Thai court has sentenced a man to 50 years in jail for comments deemed to have defamed the monarchy - the highest ever sentence handed down under the country's notorious lese majeste law.