discretize: split solve_feasible into an if-selection and another function called solve_feasible_open_loop

Reason: if solve_feasible is called with closed_loop=True, then solve_feasible_closed_loop is called. Execution proceeds to the rest of solve_feasible only if closed_loop=False. Therefore all calls to solve_feasible below the "if closed_loop" definitely have closed_loop=False.

This enables reducing the number of args passed to solve_feasible_open_loop, making the calls somewhat smaller and clearer to follow.