Move setup optimization mode to main thread

 - Due to unclear root cause of optimization mode being reset after
   reboot, update the setup logic from deferred background thread to
   main thread, to avoid any possible background task unexecuted case.

Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I2de2181321712f89fadc04bf5000aea91a01485a
Merged-In: I2de2181321712f89fadc04bf5000aea91a01485a
(cherry picked from commit 7423f4390c924e81db94cc20828ccdf78ef24a2f)
2 files changed