From molecular to polymeric CO2: bonding transformations under pressure