[thread] refactor the settings module

The current settings APIs have a few issues:
1. It doesn't support default value which is derived from resource
   overlays
2. It exposes the default values of settings entries as public APIs
   while they shouldn't be

Bug: 401654864

Change-Id: I1bbe3f14507a497320401f02fa6da512558fe385
6 files changed