Almost 1,000 men were convicted under anti-gay laws, and 1,700 were prosecuted. Their wait for justice is nearly over