Fix blocks_layout sync when content has empty blocks fields from migr…
Fixes #2887
When content has empty blocks={} and blocks_layout={items:[]} adding text to blocks created new block IDs in the blocks field but blocks_layout remained empty, causing view breakage.
This happened because changeBlock only updated the blocks field and getOnlyFormModifiedValues didn't include blocks_layout in the save operation, so the server never received the synchronized blocks_layout update.
This fix adds ensureBlocksLayoutSync helper to synchronize blocks_layout with blocks, updates changeBlock to use it, and modifies getOnlyFormModifiedValues to include blocks_layout when blocks is modified.
@wesleybl Can you please help me understand why blocks-search.js is failing? It seems unrelated to the changes in this branch.
@aryan7081 For some reason, with these modifications, when adding a search block, two blocks are added.