Bugfix: Changing Task state breaks comparator in ShowQueue

This can happens if you have a long queue and the state of
a task (DONE, CANCELLED, RUNNING, READY, SLEEPING, OTHER)
changes while the sorting is ongoing. The reason this
generates an error is because the Task State defines
the tasks’ place in the queue.

If Task state changes while the sorting of the queue is
ongoing the Comparator violates its contract of:
X<Y, Y<Z => X<Z
and throws:
IllegalArgumentException: Comparison mehtod violates its
general contract!

Fixed this bug by saving a snapshot of the state and delay
of the tasks in a wrapper.
* Introduced interface TaskInfo that is implemented by
  QueueTaskInfo
* Added getTaskInfos method in WorkQueue decoupling it from
  ShowQueue implementation by Interface and factory.

Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com>
Change-Id: Iea17046aea1b8c6119cfc663438e17f663e05b22
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7:
  Bugfix: Changing Task state breaks comparator in ShowQueue

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/git/WorkQueue.java
	gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowQueue.java

Change-Id: I7f5d5484c49a8dfb1e634ad57e28ba13ed3a607d
Merge branch 'stable-2.8'

* stable-2.8:
  Bugfix: Changing Task state breaks comparator in ShowQueue
Remove old changeDetail RPC

Convert the new RPC data into the old data, just enough to keep the
old UI alive against a newer server.  This will allow us to build a
final version of the old UI code and run it for quite some time
against a modern REST API.

Users who refuse to upgrade to ChangeScreen2 can run this frozen old
UI build until it no longer works.

Change-Id: Ieef15c39e97673f6bcdeb03567fc48ddbd289a6e
Remove old patchSetPublishDetail RPC

Change-Id: I776761163f747117fb94e4c3fd57dde77de2d31e