Add support for flat_settings flag to all REST APIs that output settings

 Closes #4140

Alternative implementation with `flat_settings` parameter instead of `human` flag.