core: Vagrant.has_plugin? tries to match gem name first

Search primary from the list of gem names which have been loaded by
`Vagrant.require_plugin`. Fall back to matching registered plugin names.