ledger-reconcile.el: don't use flatten

The new version of reconcile in Emacs use the flatten function, but this function is not part of Emacs 24.3.1, so I rewrote it somewhat to not use it.