cmd/ld: fix argument passing in doc.go

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/8622043
encoding/json: different decision on tags and shadowing
If there are no tags, the rules are the same as before.
If there is a tagged field, choose it if there is exactly one
at the top level of all fields.
More tests. The old tests were clearly inadequate, since
they all pass as is. The new tests only work with the new code.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/8617044