Measurement of jet fragmentation in Pb+Pb and pp collisions at sqrt(sNN) = 5.02 TeV with the ATLAS detector