Evolutionary transitions, environmental correlates and life-history traits associated with the distribution of the different forms of hermaphroditism in fish