cmd/trace: assign a unique span id for slice representation
cmd/trace: assign a unique span id for slice representation

Spans are represented using Async Event types of chrome trace viewer.
According to the doc, the 'id' should be unique within category, scope.

https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.jh64i9l3vwa1

Use the index in the task's span slice as the slice id, so it
can be unique within the task. The scope is the task id which
is unique.

This fixes a visualization bug that caused incorrect or missing
presentation of nested spans.

Change-Id: If1537ee00247f71fa967abfe45569a9e7dbcdce7
Reviewed-on: https://go-review.googlesource.com/102697
Reviewed-by: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>

CAFxX/go,nawawi/go,cloudflare/go,akutz/go,akutz/go,cloudflare/go,CAFxX/go,cloudflare/go,nawawi/go,akutz/go,josharian/go,Cofyc/go,Cofyc/go,akutz/go,Cofyc/go,nawawi/go,akutz/go,golang/go,golang/go,akutz/go,Cofyc/go,golang/go,CAFxX/go,Cofyc/go,CAFxX/go,Cofyc/go,CAFxX/go,golang/go,cloudflare/go,josharian/go,cloudflare/go,nawawi/go,josharian/go,golang/go,nawawi/go,nawawi/go,CAFxX/go,nawawi/go,Cofyc/go,golang/go,josharian/go,Cofyc/go,josharian/go,nawawi/go,golang/go,akutz/go,josharian/go,cloudflare/go,CAFxX/go,golang/go,cloudflare/go,josharian/go,josharian/go,CAFxX/go,cloudflare/go,akutz/go