cmd/go/internal/modload: ensure that modRoot and targetPrefix are initialized in DirImportPath
cmd/go/internal/modload: ensure that modRoot and targetPrefix are initialized in DirImportPath

For #37438

Change-Id: I2e1f47d567842ac5504b7b8ed0b3fba6f92d778b
Reviewed-on: https://go-review.googlesource.com/c/go/+/266340
Run-TryBot: Bryan C. Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Reviewed-by: Jay Conrod <f3fadaedc813344da5ec13b41e26596889cc5baa@google.com>
Reviewed-by: Michael Matloob <4562438b12c14e81a47550acde616ff328a909f8@golang.org>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Trust: Bryan C. Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>

nawawi/go,golang/go,CAFxX/go,cloudflare/go,cloudflare/go,CAFxX/go,nawawi/go,golang/go,golang/go,CAFxX/go,golang/go,CAFxX/go,nawawi/go,nawawi/go,CAFxX/go,nawawi/go,nawawi/go,cloudflare/go,cloudflare/go,cloudflare/go,golang/go,CAFxX/go,nawawi/go,cloudflare/go,cloudflare/go,golang/go,golang/go,golang/go,CAFxX/go,cloudflare/go,nawawi/go,CAFxX/go