Hundreds of gay couples have married in Thailand as a new law took effect that allows same-sex unions.