A jury in New York has found a former Mexican law enforcement official guilty of taking millions of dollars in bribes from a notorious drug cartel.