Nearly half of voters still favor the policy of so-called “sanctuary” states, which restrict state and local officials from cooperating with federal immigration authorities.