vgabios: Refactor vga_set_mode and stdvga_set_mode.