6960: error merging citations

merge_ref_test still fails...

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps40@22937 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
0006849: citationtreeview with search bar only searches in sources, not citation data
0006848: citationtreeview corrupts when search bar open and edit occurs
0006829: Searching into source/citation selector disallows to select all related citations, only matching rows

by fixing treebasemodel so it properly deals with secondary objects, and also citationtreemodel so it adds secondary odes even when the parent is not present.

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps40@22940 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
Fix dbdjango to be up to date with bsddb of gramps40: added checksum for Media; SourceAttribute and CitationAttribute gained a private flag; all primary objects got tags

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/branches/maintenance/gramps40@22946 4ae1f11a-8b86-4847-b8af-ab372f36d1fd