[INTERNAL] optimized activity execution throughput

It can happen that executing an activity may take some time. We now
merge all pending activities when we want to execute the next activity
chunk and also optimize them.

Change-Id: I73e709fe75fec2c03b7fd5d6fa4c83611c7be9f3
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/1789
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>