Add simple linear interpolation for 1D parsed functions
Functions in the parser context may very expensive to evaluate so making an interpolation may speed up assembly operations (evaluation of jacobian/residual). This MR has a simple opt-in linear interpolation that users can apply on any 1D function.