updatehub: settings: small refactor to simplify code
updatehub: settings: small refactor to simplify code

The code has been reworked. There is no semantic change, just reduce the
code size and indirections.

Signed-off-by: Otavio Salvador <1d31b11c1b92bf5d043d36edfe7174db39a6b891@ossystems.com.br>

UpdateHub/updatehub