The upper house of the Thai parliament has passed a bill legalizing same-sex marriage, making Thailand the first Southeast Asian nation to recognize marriage equality.