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.
Merge remote-tracking branch 'Guewen/reconcile-store-history' into lepistone-port_auto_to_mp-nbi