Move more init/deinit code to rarch_main_command