[consensus] another attempt to fix race condition in buffer manager
[consensus] another attempt to fix race condition in buffer manager

Previously we protect three pipeline phases with atomic counters, but missed the incoming blocks from ordering phase.
It's difficult to do the same with OrderedBlocks because processing that is in the same thread as reset, so we just pull until it's empty.

The assumption is that upon reset request, there's no concurrent incoming blocks but only requests that're already in the queue.

Another race condition is after committing the reconfiguration block, execution will create the new epoch's genesis and drop any leftover blocks.
Continue to execute reconfiguration suffix blocks will result in BlockNotFound error.

aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core