Meta-Learning of Compositional Task Distributions in Humans and Machines