Optimization and uncertainty analysis of ODE models using second order adjoint sensitivity analysis