Cardiff City have broken their transfer record again to sign Chile international midfielder Gary Medel on a four-year contract from Sevilla.