Trade-offs in an ant–plant–fungus mutualism