Appeals court rules to keep abortion pill on the market but reinstates prior restrictions