plugins: Make plugin_name() reliable past unload
Directly returning storage in the module is risky, because it
means any caller of plugin_name() after unload is getting a
stale pointer, and even callers before unload must strdup() if
they must be sure of the lifetime. Copying the name into the
heap up front means that plugin_name() can now be safely used
even if unload happens in the meantime.
As long as we have only a single plugin in static storage,
then valgrind knows that it is reachable, and we don't need
to free the copy.
Signed-off-by: Eric Blake <eblake@redhat.com>