MDL-39087 Fix plugin_manager::plugin_name() implementation
MDL-39087 Fix plugin_manager::plugin_name() implementation

This is not directly related to the issue. However, it turned out that
if this method was called on plugin_manager without loaded plugins, it
would throw an error. This new implementation uses cleaner access to the
plugininfo subclass.

dilawar/moodle