Medium modifications of charm and charmonium in high-energy heavy-ion collisions