.precompute_longitudinal: Internal helper to precompute longitudinal quantities
Description
Precomputes quantities (polynomial bases, tGt, deltas, etc.)
that are shared across LCC, LPC and LA for a given model and time grid.
Usage
.precompute_longitudinal(model, tk, q_f, q_r, basis = NULL)