President-elect Donald J. Trump said on Thursday that the stabbing attack by a refugee last week at Ohio State University was a tragic reminder of the need to take a hard line on immigration, arguing that his administration would put the safety of Americans first in a way the Obama administration never has.