[FIX] #824 Unhandled event loop exception, share multiple projects 

It seems that the used comparator was not transitive. Changed the
"sorting" algorithm. In addition the sorting algorithm now runs in O(n)
instead O(n*log n).

Change-Id: Ibbbfe98043d80581695347a20460022f90ab6bb3
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/1357
Tested-by: Jenkins CI
Reviewed-by: Nils Bussas <nils.bussas@gmail.com>
Reviewed-by: Martin Wichner <martin.wichner@googlemail.com>
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>