Buck: Add support for non transitive plugin dependencies

In some cases it might be useful to be able to pass dependencies as non
transitive dependencies, that not included in final plugin binary.

Why? When plugin dependencies are needed in both bootstrap classpath and
in plugin then they must be put in $gerrit_path/lib dir. Having them in lib
and inside the plugin doesn't make much sense.

This change exposes compile_deps parameter to the gerrit_{plugin|extension}
methods. It is possible to create both versions of the plugin: with and without
dependencies.

  gerrit_plugin(
    name = 'javamelody',
    srcs = glob(['src/main/java/**/*.java']),
    resources = glob(['src/main/resources/**/*']),
    manifest_entries = [
      'Gerrit-PluginName: javamelody',
      'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
      'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
    ],
    deps = [
      '//plugins/javamelody/lib:javamelody',
      '//plugins/javamelody/lib:jrobin',
    ],
  )

  gerrit_plugin(
    name = 'javamelody-no-deps',
    srcs = glob(['src/main/java/**/*.java']),
    resources = glob(['src/main/resources/**/*']),
    manifest_entries = [
      'Gerrit-PluginName: javamelody',
      'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
      'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
    ],
    compile_deps = [
      '//plugins/javamelody/lib:javamelody',
      '//plugins/javamelody/lib:jrobin',
    ],
  )

Change-Id: Ia274dbeb18de8807f0ab1edf7144f12ff0d02d74
SideBySide2: Add preference to hide line numbers

The line number gutters take up 60px of horizontal space.  On a very
narrow display such as a monitor turned into portrait mode users may
find the 60px too much wasted width and be unable to read the code.
Allow the line numbers to be turned off.

Change-Id: Id8431f68c2033618d515b03b13b4d82e29579db3
Show '~' for related changes on later revisions.

This is meant to indicate that the change is not a direct ancestor and
may show a completely different related changes listing when followed.

Change-Id: I630a9a1348eecb348a8ea85cde6b31bce5a33cb9
Fix delegation of self.on('showchange', f)

In JavaScript "this" is the object the method was invoked with.
Taking the function reference from Gerrit.on into the Plugin
means the function runs with the Plugin as "this", not "Gerrit".
Event registration fails when the implementation of the method is
looking for an object that does not exist in the Plugin.

Wrap the function and delegate the invocation to Gerrit.

Change-Id: I92656fd12aedfe1ab4fe90141c30135e71311330
ChangeScreen2: Add "Open All" button to Files header

Some users really miss the open all button from the old change screen.
Add the button to the Files header bar, similar in style to Expand All
in History.

Change-Id: I47f86885edc66aa88b37b3875461341ded0c7cf0
Don't use :after pseudo element.

It seems to be slow to render. Instead, append the text
directly to the related changes table.

Change-Id: I7e669cd1561626d7c0c3b31a3aa7ec734aa6cdd4
Update release process documentation

The release process documentation is out of date, referring to
steps that are no longer correct since moving to the buck build.

- Core plugins are now included in the released war file and do
  not need to be deployed separately.

- Subproject versions are managed in buck's configuration rather
  than in a Maven pom.xml file.

- Gerrit API artifacts are built and deployed to local and remote
  Maven repositories with buck build targets.

- Gerrit's release WAR file and release notes are now manually
  uploaded to the storage buckets.

Also fix a couple of formatting issues.

Change-Id: I65eff3bb8041d1a7853eb883c4e15ef104a34212
Executing CherryPick.writeCherryPickCommit() in a transaction.

This would at least allow the partial changes to the
database to rollback and not get users in a bad state when
e.g. in the case of OrmDuplicateKeyException: patch_set_ancestors'.

Bug: issue 2034
Bug: issue 2246
Change-Id: I65e111bedc3cec033299b5b5360aaee733d4b5c6
Buck: Fix infinite loop when trying to build non-existing core plugins

Running `buck build plugins:core` before initialising the submodules
causes buck to throw FileNotFoundException and then go into an infinite
loop.

The genrule in the plugins' BUCK configuration has a check in the `cmd`
to make sure the required core plugins (`NEED`) exist, but it looks
like this gets evaluated after the `srcs` which is using `CORE`.

Change `srcs` to use `HAVE`.  Now buck will exit with an error when the
core plugins do not exist.

Bug: issue 2343
Change-Id: I1bc2f67bcf6aacfe553c00e54fff18f959ac4b79
Merge changes I7e669cd1,I630a9a13

* changes:
  Don't use :after pseudo element.
  Show '~' for related changes on later revisions.
Merge "Update release process documentation"
Merge "Executing CherryPick.writeCherryPickCommit() in a transaction."
Merge "SideBySide2: Add preference to hide line numbers"
Merge "ChangeScreen2: Add "Open All" button to Files header"
Merge "Fix delegation of self.on('showchange', f)"
ChangeScreen2: Send reply message when using quick approve

If the user enters a message into the reply box and then clicks
the quick approve "Code-Review+2" instead of "Post", include the
text as part of the message. This way the cover letter is not lost.

Change-Id: Ie3a3330f017cc08937d4e28d1eea8e3828ad9e54
Merge "ChangeScreen2: Send reply message when using quick approve"
ChangeScreen2: Allow ctrl-click to open comments in new tab

Use InlineHyperlink instead of Anchor, which understands the
idea of an internal link and calls Gerrit.display() to open
in this tab, or recognizeds Ctrl-Click and allows the browser
to handle the link natively.

Change-Id: I7a888ce3c441bee88737ab3e3e0837f038d773d4
ChangeScreen2: Add reviewer email address to tooltip

Display the tooltip for each reviewer. Using title is a short-term
hack until info cards can be displayed instead. The AvatarPopup is
not available here from SafeHtmlBuilder.

Change-Id: Ib72da42fa841d49f4c039d8537addafdc249e67f
Fix old UI editing draft comment after saving

Editing a draft comment after it was initially saved corrupted the
path. The UI replaced the path with the unique ID of the comment.
Extract the correct parent string value to get to the Patch.Key
and obtain its file path.

Change-Id: I1977aa45b1b339e74c166c2e45b11c9cc94e365a