Added new option for perfect foresight simulations (sim1 routine, available only with stack_solve_algo==0).

Try to reduce the size of the nonlinear system of equations by skipping the (last) periods for wich the residuals are
already (almost) zero. The number of periods is not constant during the Newton, the effective number of periods for
each iteration of the Newton is available in oo_.deterministic_simulation.vperiods.
Document new option (endogenous_terminal_period).
Merge branch 'master' into sim1-with-variable-dimension
Added new routine to compute the max. abs. error associated to a path (perfect foresight models). Use this routine to compute (and report) the true max. abs. error when sim1 (stack_algo==0) is used with option endogenous_terminal_period.
Cosmetic/Efficiency changes.
Give more details about endogenous_terminal_period option.
Option endogenous_terminal_periods is only available with stack_solve_algo==0.
Added test (+ cosmetic changes).
Merge branch 'master' into sim1-with-variable-dimension