Same-sex couples in Thailand will be able to marry from next week, under Southeast Asia's first law allowing their unions.