Tracing statistics: use correct labels in legend of pie charts

The legend showed the wrong labels/names since commit 53a94ce. In the manual
legend drawing routine, I expected the names to be ordered according to the value
object. This is not true. The pie chart values are an object, after all---so no
specific order should be assumed. This commit fixes this by using the correct
indicates for the name list. These are available from each value entry.

This fixes point 5 of issue #625.