make sure header PMMR is init correctly based on header_head from db #3362
We had logic in chain init to make sure header_head was consistent with the header PMMR (in the case where it was missing from the db after migration to 3.x.x).
This PR adds logic to ensure the inverse of this - that the header PMMR is consistent with header_head from the db in the case where the header PMMR contains unwanted rightmost data.
We simply (re)set the PMMR handle
Also tweaked the order of operations slightly when processing block headers.
Tested with sync (and staying in sync) on both