Optimize list manipulation

This patch optimizes the various allocations of ArrayList where we know
the target size.
- by versionOrder the size equals to the highest version value + 1

Change-Id: I2a54a4cacc21fe8d382080954de5fd8d2c16f472
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Signed-off-by: Michal Rehak <mirehak@cisco.com>