Even as a new Texas law targeting so-called sanctuary cities remains in legal limbo, police chiefs and sheriffs are making changes to comply, rewriting training manuals and withdrawing policies that prevented officers from asking people whether they are in the United States illegally.