[vm, service] Fix over-count of HeapSnapshot.referenceCount.
[vm, service] Fix over-count of HeapSnapshot.referenceCount.

Adjusts the counting phase to use the same visitor as the writing phase.

TEST=deliberately omitting checks from reader for backward compatibility
Change-Id: I8a08c1e9549fd4137714097a868541b09f160157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205245
Commit-Queue: Ben Konyi <67ffcaedcc3dc3d87dddb9627b72dd41756b31b1@google.com>
Reviewed-by: Ben Konyi <67ffcaedcc3dc3d87dddb9627b72dd41756b31b1@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk