Quarkonium Production in p-Pb and Pb-Pb Collisions