A Thai ex-official known for his lavish lifestyle and political connections has been sentenced to life in prison.