The history does not store the reconciled entries

Because the new reconciliations are committed in a different transaction
than the one used to create the history.
Move the new cursor initialization to the outer method 'run_reconcile()'
so everything is enclosed in the same transaction.
please remove the `# noqa`