[runtime] Align sizes before aligning them to pagesize in the code manager to avoid allocating blocks which are larger than they should be.