Fixed defect code, added double integrator test

Added the Bryson/von Stryk double integrator test case. Also fixed some errors
in the defect code. Finally, also ensured state order was same as ODEs and now
enforcing first order ODEs.