CSync: Close/Reopen DB between update and reconcile

update and reconcile happen in different threads. This code is safer.
(Even though depending on sqlite3 version it should work anyway)