support balance resetting and make assertion semantics same with ledger

To support balance resetting, we need to keep track of "current" account balances. The algorithm for balance assertion/assignment/resetting is basically the same: derive the amount from the assertion, and compare it to the actual amount, if any.

If there are multiple assertion postings for the same account in one transaction, it's not always possible to derive&update posting by posting. So when this happens, I don't update the balances mapping until all postings are checked for a transaction. This seems to be the semantics of ledger 3.0 also. So the tests are also updated/modified to reflect these situation.