Farming and public goods production in C. elegans populations