Comparison of Fragmentation Functions for Jets Dominated by Light Quarks and Gluons from pp and Pb+Pb Collisions in ATLAS