[415575] cache capacity should be calculated based on max heap size

The capacity is now calculated based on the max heap size instead of
being a fixed value. The formula is exponential, so the capacity is tiny
when the max heap size is small (around 256 MB) and grows significantly
on bigger heap sizes.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=415575
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>