After Mr. Trump’s aides spent much of Monday expressing outrage over the burning of a place of worship, Hope Hicks, a presidential adviser, eventually hatched a plan with others at the White House to have the president walk over to the building, according to an official familiar with the events.