Fix the memory requirements of SurvCache

The survcache required O(n^2) memory which was impossible when 100 000
doubles were requested (1000GB). This commit reduces the required memory
to O(n) but has increased the initial computation time slightly, like
O(3*n^2) instead of just O(n^2).  However this is offset by using OpenMP
to parallelize the calculations for A, B, and C.

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>