New York passes a law aimed at gradually abolishing slavery in the state