State reverses opposition to same-sex couples adopting children