[PLAT-6666] Linear interpolation instead of simple average

Calculation of the rate of a stub period by interpolating between two indices: interpolation should be linear and not simple average.

@mclornp @stuartw  Would you take a look?