President Donald Trump appeared to back off his demand for $5 billion to build a border wall, signaling for the first time that he might be open to a deal that would avoid a partial government shutdown.