Revert "Revert "Update split chunk handling for edge/node" (#62313)" (#62336)
This re-lands the chunking optimization with fix for the split chunks
config to ensure we aren't generating duplicate chunks from not chunking
`all` together.
Tested various configs against our repro case here:
https://vercel.com/vercel/vercel-site/2D5Xirs9Vr1M29WHAuNawgjvgE4G
https://vercel.com/vercel/vercel-site/B2aez1NNCyVvoUBTSMFy8npBKK3j
Closes NEXT-2552
closes: https://github.com/vercel/next.js/issues/51298
x-ref: https://github.com/vercel/next.js/pull/62313