Clarify and cleanup Config variables and functions.

* Clarify gerrit.config and project.config parameters.
  * "alwaysShowButton" is obsolete, assumed true now.
  * Include all parameters to REST API returned JSON object;
    fix expected test output in ApiIT.java.
  * Explain all parameters in rest-api.md.
* Minimize repeated calls to create PluginConfig:
  * Change Action, Cache, Checker, OwnersDb, FindOwners to reuse
    Config instead of creating it from PluginConfigFactory.
  * Save one gerritConfig in Config and Cache projectConfig in Config.
  * Add/simplify unit test interface functions.
* Coding style improvements:
  * Use Duration.ofSeconds instead of TimeUnit.SECONDS.

Change-Id: If27b7ae0e0f59f434ec2d536e1b08af0857708e0
11 files changed
tree: 241a75963fa4492c22061893062c4508ad29d922
  1. src/
  2. BUILD
  3. LICENSE
  4. OWNERS