A voter-approved animal welfare measure sparked years of litigation, culminating in a divided Supreme Court ruling that could reshape interstate commerce law