Actually merge the global unknown key-value pairs.
Add a test for merging unknown key-value pairs.
This is a partial backport of Core PR13721 : https://github.com/bitcoin/bitcoin/pull/13721/commits/fad231ad41e12b7047deb64220942ca8cb8357bc
Depends on D4456