Use '-' in cache name as separator between plugin name and cache name

In other places we already use '-' as separator in names that include
the plugin name, e.g. for capabilities that are defined by a plugin.
To be consistent the cache name should use the same separator. '.'
cannot be used for capabilities since it is not allowed in parameter
names in Git config files.

Change-Id: Ic1a669930831a1d4e526f2a22771879ecf7f19c1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Add REST endpoint to list caches

GET /config/server/caches/ lists the server caches. Caches defined by
plugins are included.

The implementation of the SSH show-caches was adapted so that it uses
the new REST endpoint to get the information about the caches. This
avoids code duplication.

For disk caches a new interface was introduced in gerrit-server. This
is done because the list caches REST endpoint needs extra information
for disk caches which can only be provided by the disk cache, aka
H2CacheImpl. H2CacheImpl is defined in gerrit-cache-h2, but
gerrit-server doesn't have a dependency on it and hence can't use
instanceof to check whether a cache is a disk cache. Adding this
dependency is not wanted and also not possible (because
gerrit-cache-h2 already depends on gerrit-server and we can't have
cycles in the dependencies).

Change-Id: I21bf6e114310f98051a0a8db01012511f58d4add
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Add REST endpoint to get a cache

Change-Id: I09bfa7c052f2b8411b218c77683cda45a0afe844
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Make the --other-branches configurable

Introduce a branchOrder section in the project.config in order
to define a branch order and automate the back/forward porting
of changes.

For now assume only one branchOrder section. For example:

  [branchOrder]
    branch = master
    branch = stable-2.9
    branch = stable-2.8
    branch = stable-2.7

This format makes the ordering obvious (top-down) and complete: for any
two branches from the list the order is defined.

The --other-branches will rely on the branchOrder section in order to
find out a set of branches for which to check mergeability.  With the
above example, If a change is pushed to the master branch then the
--other-branches option will test mergeability into the stable-2.9,
stable-2.8 and stable-2.7 branches. If the changed would be pushed to
the stable-2.8 then the --other-branches option would test mergeability
only into the stable-2.7 branch.

Change-Id: Ib806d7e4b5702fa2d8effd197829b729cad95432
Merge "Make the --other-branches configurable"
Merge topic 'rest-caches'

* changes:
  Add REST endpoint to get a cache
  Add REST endpoint to list caches
  Use '-' in cache name as separator between plugin name and cache name