godoc: follow symbolic links to folders in GOROOT

Directory walking in godoc relies on ReadDir which returns the result
of os.Lstat.

Instead make the the OS VFS's ReadDir use os.Stat on symlinks before
returning.

Fixes golang/go#15049

Change-Id: I34d17ca0027b0245f5ef434a000e5a3fe2af11cf
Reviewed-on: https://go-review.googlesource.com/45096
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed