The Supreme Court on Monday vacated an appeals court ruling that President Donald J. Trump had violated the First Amendment by blocking people from his Twitter account after they posted critical comments.