Felsenstein's tree pruning algorithm