added tests for the optional query interface
fixed seg fault due to double delete in tear down
Merge branch 'optional-tests' of github.com:gidden/cyclus into gidden-optional-tests