[RESEND 0/7] Refactor generic fastboot_set_reboot_flag implementation