Disentangle ListPlugins and PluginLsCommand

ListPlugins has a lot of code that is only used for printing the
output to stdout, which is only used by PluginLsCommand.

Simplify ListPlugins to only return the map of plugins, and move the
logic for displaying the output into PluginLsCommand.

PluginLsCommand does not have access to the Plugin objects, but only
to what is returned in PluginInfo instances. Extend that to include
the filename, which was previously accessible to ListPlugins.

This change removes support for the format option from the list
plugins REST API endpoint.

Change-Id: I0c352e587d5f0e8d524ae5b7322e1feec9434d58
diff --git a/Documentation/rest-api-plugins.txt b/Documentation/rest-api-plugins.txt
index 0f687bf..938d101 100644
--- a/Documentation/rest-api-plugins.txt
+++ b/Documentation/rest-api-plugins.txt
@@ -47,6 +47,7 @@
     "delete-project": {
       "id": "delete-project",
       "index_url": "plugins/delete-project/",
+      "filename": "delete-project.jar",
       "version": "2.9-SNAPSHOT"
     }
   }
@@ -73,11 +74,13 @@
     "delete-project": {
       "id": "delete-project",
       "index_url": "plugins/delete-project/",
+      "filename": "delete-project.jar",
       "version": "2.9-SNAPSHOT"
     },
     "reviewers-by-blame": {
       "id": "reviewers-by-blame",
       "index_url": "plugins/reviewers-by-blame/",
+      "filename": "reviewers-by-blame.jar",
       "version": "2.9-SNAPSHOT",
       "disabled": true
     }
@@ -105,6 +108,7 @@
     "delete-project": {
       "id": "delete-project",
       "index_url": "plugins/delete-project/",
+      "filename": "delete-project.jar",
       "version": "2.9-SNAPSHOT"
     }
   }
@@ -134,6 +138,7 @@
     "delete-project": {
       "id": "delete-project",
       "index_url": "plugins/delete-project/",
+      "filename": "delete-project.jar",
       "version": "2.9-SNAPSHOT"
     }
   }
@@ -168,11 +173,13 @@
     "some-plugin": {
       "id": "some-plugin",
       "index_url": "plugins/some-plugin/",
+      "filename": "some-plugin.jar",
       "version": "2.9-SNAPSHOT"
     },
     "some-other-plugin": {
       "id": "some-other-plugin",
       "index_url": "plugins/some-other-plugin/",
+      "filename": "some-other-plugin.jar",
       "version": "2.9-SNAPSHOT"
     }
   }
@@ -200,6 +207,7 @@
     "reviewers-by-blame": {
       "id": "reviewers-by-blame",
       "index_url": "plugins/reviewers-by-blame/",
+      "filename": "reviewers-by-blame.jar",
       "version": "2.9-SNAPSHOT",
       "disabled": true
     }
@@ -229,6 +237,7 @@
     "delete-project": {
       "id": "delete-project",
       "index_url": "plugins/delete-project/",
+      "filename": "delete-project.jar",
       "version": "2.9-SNAPSHOT"
     }
   }
@@ -429,6 +438,7 @@
 |`id`       ||The ID of the plugin.
 |`version`  ||The version of the plugin.
 |`index_url`|optional|URL of the plugin's default page.
+|`filename` |optional|The plugin's filename.
 |`disabled` |not set if `false`|Whether the plugin is disabled.
 |=======================