A federal judge on Friday struck Donald Trump’s $15 billion defamation lawsuit against the New York Times over its content, calling it a “decidedly improper” effort to attack an adversary.