The president’s challenge will be to lift many of his predecessor’s immigration restrictions while meeting the rising expectations of migrants.