Add support for linear models in perfect_foresight_problem MEX

In that case, the Jacobian needs not be recomputed for each period.

Edited by Sébastien Villemot