Revert "Remove threads_init/dbus mainloop code to fix Bug #1081235, the hang issue when error during apt work"

This reverts commit 4445386e09296cb224b8092f0f66cb4019133d06.
The final fix for Bug #1081235, the hang issue when error during apt work