Thailand is set to outlaw recreational cannabis by the end of the year, two years after being the first country in Asia to legalize it.