JSON: add fallback to original slug approach

If we can't get the cached plugin slug, let's try to infer that from the
path to the plugin file.
Merge pull request #1407 from Automattic/try/different-plugin-slug-strategy

JSON: add fallback to original slug approach