Deactivate before closing a Repo
Make templated query methods work

and add some more doxygen...
Nicer TempRepo / TempRepoOpener convenience classes