[test] Adding tests for database IO
select() does not automatically select all the columns
moveHead is an update operation
Annotated tags have a name property
refs do not necessarily point to commits, annotated tags are also possible
Fix small mistakes

 * Defer::defer needs 2nd parameter
 * gihp\Object\Loader needs a parameter
 * misspelled gihp\\Object\\AnnotatedTag
clearCache() function will soon be in the interface
Query must be execute()'d before we can fetchAll()
Throw another kind of exception when there is no result