The New York attorney general, Eric T. Schneiderman, will announce on Thursday that he is issuing legal guidance to local governments detailing how they can resist cooperating with the federal immigration authorities under the Trump administration.