Court rulings restores critical immigration decisions for people from 39 countries impacted by travel ban