Update EncryptedContactStore to not use deprecated/removed methods

The PGPEncryptedDataGenerator constructor and addMethod calls used in
EncryptedContactStore were deprecated in version 1.49 and removed in
version 1.51 of Bouncycastle.

Update the calls to use the recommended non-deprecated versions.

Change-Id: I134fd8c0b4538ae23a2c17dd0a632ddaff28aa3d
Bump Bouncycastle version to 1.51

This version fixed some bugs [1] and latest SSHD release that we need
has upgraded to this version as well: [2].

[1] https://www.bouncycastle.org/releasenotes.html
[2] https://issues.apache.org/jira/browse/SSHD-362

Change-Id: I84aee1e620091bcd49a1f0be47f4da011a8ff3ee
Bump SSHD Mina version to 2.0.8

SSHD version 0.13.0 uses this Mina version.

Change-Id: I7e27dce435764a19aa27b58ea619d063f640a8fb
SSHD: Update to 0.13.0

Long standing exhausting thread pool SSHD bug was apparently fixed
upstream [1].

All Gerrit releases since 2.8.5 are known to suffer from this problem
with the consequence that Gerrit must be restarted overnight.

[1] https://issues.apache.org/jira/browse/SSHD-348

Change-Id: Ic52277050aa0cd19b19531ee997d312fd7273ebc
gerrit-pgm: Align Buck rules with package boundaries

Extract http package in its own rule and include it it gerrit-war. That
means that the new artifact is going to be packaged in WEB-INF/lib
directory leaving only root pgm package artifact in pgm-lib.

Remove shell package and move one class in root pgm package. A resource
file that belongs to this functionality as well, was already in root
resource package, so it wasn't consistent anyway.

This change also extracts DEPS dependency definition with artifacts that
are shared in different rules to reuse them and not to repeat the code.

Change-Id: Ie8cbab9c1333ef34dd240619e214674f8b583d2c
Inject InitStep members again before calling postRun.

InitStep instances are created before a site is initialized and the set
of injectable objects is quite small at that time. This also limits
what could be done from the postRun method, which is invoked after site
is initialized.

After the site is initialized a sysInjector is already available and
we could make use of it in order to perform optional injection and
provide the InitStep.postRun with additional useful objects. This way
the postRun can perform many more things than before.

To make use of the optional injection in an InitStep one would write
something like:

  public class MyInitStep implements InitStep {

    private final ConsoleUI ui;

    @Inject
    MyInitStep(ConsoleUI ui) {
      this.ui = ui;
    }

    @Override
    public void run() throws Exception {
      ...
    }

    @Inject(optional = true)
    void setGitRepositoryManager(GitRepositoryManager git) {
      gitManager = git;
    }

    @Override
    public void postRun() throws Exception {
      // make use of gitManager
    }
  }

Change-Id: Idfd04747f45db8c7e0aee892175245ccd280d5e0
RebuildNotedb: Fix guice bindings

Also add unit test to prevent breaking it again without notice.

Change-Id: I1d32489cb45f8634511fecceb9006c05db108171
Merge "Inject InitStep members again before calling postRun." into stable-2.9
Merge changes from topic 'sshd-upgrade' into stable-2.9

* changes:
  SSHD: Update to 0.13.0
  Bump SSHD Mina version to 2.0.8
  Bump Bouncycastle version to 1.51
  Update EncryptedContactStore to not use deprecated/removed methods
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9:
  Inject InitStep members again before calling postRun.
  SSHD: Update to 0.13.0
  Bump SSHD Mina version to 2.0.8
  Bump Bouncycastle version to 1.51
  Update EncryptedContactStore to not use deprecated/removed methods

Change-Id: I4d67f79b9614289f222f9adcc8c513813ab3035c
Merge branch 'stable-2.10'

* stable-2.10:
  Inject InitStep members again before calling postRun.
  SSHD: Update to 0.13.0
  Bump SSHD Mina version to 2.0.8
  Bump Bouncycastle version to 1.51
  Update EncryptedContactStore to not use deprecated/removed methods

Change-Id: I7853def28109357e8629f1384f90d4630da00483
Merge "gerrit-pgm: Align Buck rules with package boundaries"
Clean up stale GWT Dev Mode documentation

Dev mode was deleted in If541bc48b. Clean up documentation as well.

Bug: issue 3008
Change-Id: Ifc98e81e1a07e39afb43c771f4b8e5ad00717a2d
Convert server acceptance tests to use Google Truth

Change-Id: I12cb75d43361f7cdc6c9350a76d5301a1c288406
Merge "RebuildNotedb: Fix guice bindings"
Merge "Convert server acceptance tests to use Google Truth"
Merge "Clean up stale GWT Dev Mode documentation"
Fix warning about redundant argument in BaseInit

Change-Id: Ib60f4fb8de341a5470d38d5a62c65502910e1dd8
Fix up usage of Google Truth in previously converted acceptance tests

Use:

 assertThat(results).hasSize(2)
and
 assertThat(results).isEmpty();

Instead of:

 assertThat(results.size()).is(2);
and
 assertThat(results.isEmpty()).isTrue();

Change-Id: Ie3ef2e330a010a2135994be7b9b2af6bb2aabd3f
Convert inline edit acceptance tests to use Google Truth

Change-Id: I742be0528bdbabd4536cf2c5d559391e0f33491a