Keep the pointer location from the initial window-manager
between file load operations.
This is needed as the Python API may hold references to keymaps for e.g.
which are transferred to the newly loaded window manager, without their PointerRNA.owner_id fields being updated.
Since there is only ever one window manager, keep the memory at the same location so the Python ID pointers stay valid.
Notes
I'm skeptical of including BKE_libblock_remap. while technically correct, it seems like a heavy operation for a case which is doesn't seem useful in practice.
- As there is only ever one window manager, it doesn't seem useful to reference it from an ID property.
- References to windowing data aren't reliable, they will be lost when opening with "Load UI" is disabled.
- Currently support for referencing windowing in IDProperties seems quite untested/buggy, I managed to crash Blender storing a workspace in an ID properties, then removing the workspace - for example. We could consider these bugs to fix, again - it seems a fairly obscure use-case.
An alternative solution to BKE_libblock_remap could be to do-version existing files, removing window-manager (perhaps all windowing ID's) from ID-properties & drivers. So there is no need to check for this case.
Or, this patch could be committed as-is, keeping open the possibility of removing window-manager references in the future.