Measurements of quarkonia and open heavy-flavour production in heavy-ion collisions with the ATLAS detector