Immigration enforcement is largely a federal responsibility, but over the past decade, North Carolina lawmakers have steadily expanded the state’s role.