Mutualists construct the ecological conditions that trigger the transition from parasitism