go.tools/cmd/godoc: wait for analysis to complete in TestTypeAnalysis
go.tools/cmd/godoc: wait for analysis to complete in TestTypeAnalysis

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://codereview.appspot.com/157590043

karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools