Moving to counter the spreading coronavirus outbreak, the Trump administration said Friday that it would bar entry by most foreign nationals who had recently visited China and put some American travelers under a quarantine as it declared a rare public health emergency.