Justices say the president can fire top regulator in a separate decision