ChangeMergeQueue: Fix race condition

To the multiple triggers of submit action belong:

* ChangeMergeQueue.merge() method called from the UI
* ChangeMergeQueue.schedule() method called by background
ReloadSubmitQueueOp

active map in ChangeMergeQueue acts as a guard for submit job
scheduling. However schedule() ignores the fact that the submit
processing was already started for a specific branch and double
submit action is scheduled.

Specifically for cherry-pick submit strategy that cannot end
good and fails with database constraints violation or similar,
depending on the underlying database implementation.

Guard the background scheduling similar to the UI scheduling.

Defining unique index prevents the database corruption: [1], [2]
but not the collision between manual and background merge jobs.

[1] http://paste.openstack.org/show/83883
[2] http://paste.openstack.org/show/83888

Bug: issue 2034
Bug: issue 2383
Bug: issue 2702
Change-Id: I5b23f9d481351280e26412b82b525947338d9c00
Add missing 'link:' in 2.8.5 release notes

Change-Id: I6268999ab31dd26b829b650d98d076f7223868bd
Release notes for Gerrit 2.8.6

Change-Id: I72451095da8ee6973fbe140edbf9954420b2b795
Bump API version to 2.8.6

Change-Id: I358bca8e7187c50ddb2ca71498d130927fb1aeda
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
(cherry picked from commit eb4778d079e7156c82d04c2f26c71ca89d12df16)
Prevent possible NPE in AuthorRevision.equals

Add check for the given object being an instance of the
expected class.

This clears a warning from Findbugs.

Change-Id: I097f8894239f04804a0038b504eccd8e2374b07a
Buck: Strip SNAPSHOT suffix in artifact names only for GERRIT repositories

Maven artifact names on Google bucket replacing SNAPSHOT suffix with
timestamp. 731967591ef98ab3c94691ba9dc0f217630dda76 changed this by
preserving the SNAPSHOT suffix. This broke fetching of gwtorm and
gwtjsonrpc and was reverted by 731967591ef98ab3c94691ba9dc0f217630dda76.

This change fixes this for both worlds: stripping it for GERRIT and
GERRIT_API Maven repositories but preserving it for the rest.

Test plan:

maven_jar() is working as expected for the both worlds:

* gwtorm:gwtorm:1.10-SNAPSHOT-20140310.015132-1 (repo = GERRIT)
* org.eclipse.jgit:org.eclipse.jgit:3.4.0-SNAPSHOT (repo = MAVEN_LOCAL)

Change-Id: I5357abe9ad6a40538c444ad70016c8c6d75d8ff3
Update gwtorm to 1.7.1

Change-Id: Ia9ba26bdda20a053bc3a267c5c9efad37e76ab77
Expose Atlassian's maven repository

Change-Id: Ie6c8ff50f4ed6460aa7cbdea707d97fdd1f86a40
Update SSHD to 0.11.1-atlassian-1

Use custom build of SSHD library from Atlassian's maven repository,
that fixes sporadic handshake failures [1].

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

Change-Id: I4258f515ac10e04c8c8f1850f060b9dbad6d876f
Update 2.8.6 release notes with recent fixes

Change-Id: I58376c245026e3f940703c986bd8c5789cb9ed3b
Upgrade gwtorm to 1.7.3

Fixes regressions introduced in 1.7.1 and 1.7.2

Change-Id: If288b3a1e17715e9e511aed1869d1ad32b80444c
Update version to 2.8.6.1

Change-Id: I8669d1b25ea3b2b1e3449f449b88427193cbe822
Remove reference to MyISAM from database setup documentation

From 2.8.6 only transactional databases are supported.

Change-Id: Ie0d94c40a371dd018b897113eca8b745a1000d2e
Release notes for Gerrit 2.8.6.1

Change-Id: I625ac1ad8b84e81902d4c936c214ff242098de2f