Improve runtime database query functions

No longer susceptible to `.next()[0]` problem.
#1004: test for handling bad sequence interval
#1004: disallow 2-digit centuries
improve error message
Merge pull request #1070 from benfitzpatrick/1004.handle-bad-recurrence-nicely

#1004: handle some bad recurrences nicely
Merge pull request #1067 from matthewrmshin/improve-db-query-funcs

Improve runtime database query functions
Use natural sort order in graph tests.
Don't reload tasks in the 'ready' state.
Merge pull request #1072 from hjoliver/graph-test-sort-order

Use natural sort order in graph tests.
Merge pull request #1074 from hjoliver/reload-adjustment

Don't reload tasks in the 'ready' state.