A politician hoping to become the Democratic mayoral candidate for New York City has been arrested by federal agents.