InputController: Wait for associated display sync for input devices

When creating a virtual input device, the device must be associated with
a display. It's possible that the device association gets applied after
the input device is added, because the associated display is not a
static property of the device.

When waiting for the input device to be created, wait also for the
device to be associated with the display.

Bug: 324061913
Bug: 293587049
Test: atest VirtualDeviceMirrorDisplayTest#virtualMouse_buttonEvent --rerun-until-failure
Change-Id: I53fd15b823ee02481ce62bc74eb5bfd098f1ee17
4 files changed