New legislation would hand state attorneys general veto power over large swaths of federal immigration policy.