The Obama administration has begun a profound shift in its enforcement of the nation’s immigration laws, aiming to hasten the integration of long-term illegal immigrants into society rather than targeting them for deportation, according to documents and federal officials. In recent months, the Department of Homeland Security has taken steps to ensure that the majority of the United States’ 11.3 million undocumented immigrants can stay in this country, with agents narrowing enforcement efforts to three groups of illegal migrants: convicted criminals, terrorism threats or those who recently crossed the border.