generic-player: handle eject better while still scanning

Before ejecting, cancel the import job and wait for it to finish,
so we're not still trying to access the device while ejecting it.