runtime, plugin: error not throw on duplicate open

Along the way, track bad modules. Make sure they don't end up on
the active modules list, and aren't accidentally reprocessed as
new plugins.

Fixes #19004

Change-Id: I8a5e7bb11f572f7b657a97d521a7f84822a35c07
Reviewed-on: https://go-review.googlesource.com/61171
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/src/plugin/plugin.go b/src/plugin/plugin.go
index c774465..c37b65f 100644
--- a/src/plugin/plugin.go
+++ b/src/plugin/plugin.go
@@ -20,6 +20,7 @@
 // Plugin is a loaded Go plugin.
 type Plugin struct {
 	pluginpath string
+	err        string        // set if plugin failed to load
 	loaded     chan struct{} // closed when loaded
 	syms       map[string]interface{}
 }