This merge does not rename any ID. In case a conflict happens (an ID of
the same name and library already exists in destination Main), its
counterpart in source Main is not moved, and its usages by other
moved-from-source IDs are remapped accordingly.
Libraries are also properly de-duplicated, and remapped as necessary.
Source Main is always freed by this function, since it is either empty,
or contains left-over IDs very likely to have invalid relationships
after the merge.
NOTE: This commit also enables `main_test.cc` unittests, which was
comitted by mistake in fe3cb11ae4, sorry about that.
Pull Request: https://projects.blender.org/blender/blender/pulls/115671