The White House press secretary said that Mr. Trump had spoken to Senator John Cornyn, Republican of Texas, about legislation to revamp background checks.