Top federal immigration official resigns