cmd/go/internal/imports: resolve symlinks in ScanDir
We were using the mode reported by ReadDir to decide whether each
entry is a file, but in the case of symlinks that isn't sufficient: a
symlink could point to either a file or a directory, and if it is a
file we should treat it as such.