Add Purple::main_loop_step

From strelok1111