[runtime] Allocate code chunks next to each other if possible to prevent vm fragmentation when they are freed during domain unloading. Fixes #17987.