Move the process_deferred_messages idle cb when switching main contexts