device: keep a NMDevice reference during a deferred state set

When the device has been surprise removed, it could be that all the live
references will go away during the state change:

  [manager abruptly removes enp0s26u1u2i19 device, because a modem claims it]
  <info>  [1558090169.7758] device (enp0s26u1u2i19): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed')
  <info>  [1558090169.8108] device (enp0s26u1u2i19): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed')
  <info>  [1558090170.3252] dhcp4 (enp0s26u1u2i19): canceled DHCP transaction, DHCP client pid 954
  <info>  [1558090170.3253] dhcp4 (enp0s26u1u2i19): state changed bound -> done
  ((src/nm-dispatcher.c:543)): assertion '<dropped>' failed
  g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed
  g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed
  g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed
  g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed
  ((src/devices/nm-device.c:1391)): assertion '<dropped>' failed
  g_object_notify_by_pspec: assertion 'G_IS_OBJECT (object)' failed
  <warn>  [1558090170.3296] device [null]: remove_pending_action (1): 'queued-state-change-disconnected' not pending
  file src/devices/nm-device.c: line 14244 (<dropped>): should not be reached
12 jobs for lr/set-state-ref in 38 minutes and 50 seconds (queued for 27 seconds)
latest
Status Job ID Name Coverage
  Test
passed #305394
allowed to fail
checkpatch

00:01:00

passed #305401
t_debian:9

00:14:49

passed #305403
t_debian:sid

00:15:14

manual #305402
allowed to fail manual
t_debian:testing
passed #305395
t_fedora:28

00:30:27

passed #305396
t_fedora:29

00:37:17

passed #305397
t_fedora:30

00:29:58

manual #305398
allowed to fail manual
t_fedora:rawhide
passed #305399
t_ubuntu:16.04

00:18:54

passed #305400
t_ubuntu:18.04

00:14:36

 
  External
passed NetworkManager test verification

passed NetworkManager test verification

06:05:16