Plugin install endpoint: slug should never be empty

the plugin slug could have been empty if the plugin was a single file,
and not stored in a directory
Plugin Install Endpoint: use slug in the request

Instead of using the plugin id ( i.e. wordpress-seo/wp-seo ) in the request
we will use the slug ( i.e. wordpress-seo ). In browsing plugins on the .org
directory, we found that only the slug is available. I created a new function
get_plugin_id_by_slug, so that, after installation, we can convert the slug
into a plugin id, so that our newly installed plugin will pass validation
Merge pull request #1218 from Automattic/fix-issue-1217

Plugin install endpoint: slug should never be empty