President Donald Trump, who has avoided wearing a mask in public even as the coronavirus pandemic spread, donned one on Saturday at a military medical facility outside Washington where he was to meet with wounded soldiers and front-line health-care workers.