[PATCH v2 02/35] common: Move main_loop() to init.h