The judge said the laws — one of which was a first-in-the-nation prohibition on the use of medication to end pregnancy — violated the state's constitution