Fix AnormIndex.getTracesDuration to get the duration of the entire trace.

If I understand correctly, `Index.getTracesDuration` should return the duration of the entire trace. But the current implementation of `AnormIndex.getTracesDuration` returns a span's duration rather than a trace's one. Because of this, `QueryService` can't sort correctly by duration.