LinearizedOrderGPMixin: Fix linearization for non-path goals
For path_variables one can use the original MX symbol in the expression, or use problem.state() to get it. For extra_variables, one cannot use the original MX symbol, but has to use problem.extra_variable().
Closes #1115 (closed)