A man with close ties to Wikileaks co-founder Julian Assange has been arrested while trying to leave Ecuador, the country's interior ministry says.