Implement merging of settings from different sources (command line and config
file) separately from parsing code in system.cpp, so it is easier to add new
sources.
Document current inconsistent merging behavior without changing it.
This commit only adds new settings code without using it. The next commit calls
the new code to replace existing code in system.cpp.
Co-authored-by: John Newbery <john@johnnewbery.com>
This is a partial backport of Core PR15934 : https://github.com/bitcoin/bitcoin/pull/15934/commits/9dcb952fe5f85529ab28e091af7534e72c21c90f