Added generalized interpolate_with_threshold

An interpolate any one-dimensional data, with a threshold for the
maximum size of consecutive NaNs to interpolate across.