[Fix] Fix a memory leak in Setting.cpp.
[Fix] Fix a memory leak in PlayerSelectionRule.cpp.
cppcheck performance fixes in dbwrappers/