Thailand has freed a political activist after eight years in jail for insulting the country's widely revered monarchy under its draconian royal defamation laws.