abc-finalize-block has a race condition where node may not be synced when its finalized block is checked: https://build.bitcoinabc.org/viewLog.html?buildId=29570&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterUbsan&tab=buildLog&_focus=2214
This patch waits until node is synced before checking. I also took the opportunity to rearrange some of the checks in
this section of the test so that checks on each node are organized together. IMO this is easier to read.