cpp: update global settings factory and implement formatter settings factory