Type promotion for keys and values for Dict merge

Discussed in #8877.
Merge pull request #8883 from ninjin/dict_merge

RFC: Type promotion for keys and values for Dict merge