Correctly tell plugman which object in config to remove

CB-5016: Plugman was always assuming that a plugin found as a dependency was _installed_ as a dependency. This led to a problem where explicitly adding a dependent plugin manually would lead to a broken state after removing the "parent" plugin because the dependent plugins entry would still be in the plugins/{platform}.json file. The change just checks to see if the plugin to be deleted is listed as a dependency_plugin or an installed_plugin and sets "is_top_level" so that the entry is correctly removed from {platform}.json. Tested with npm test, no failures.