Fix setting paired state when device->authr is false

Some buggy controllers might generate a link key notification even after
a disconnect has been requested. To make sure that device->paired is in
sync with the real paired state set the value independent of
device->authr when a link key notification happens. Below is a snippet
of such buggy (or at least strange) behavior from a controller:

< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 6 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 00:26:CC:77:xx:xx key 33E6F2B75FC870AA794BB6249EBD6AC6 type 0
    Type: Combination Key
> HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 6
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 6 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 6 reason 0x16
    Reason: Connection Terminated by Local Host
diff --git a/src/device.c b/src/device.c
index 8d60f4c..03d6ffc 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2068,8 +2068,6 @@
 							device);
 		}
 	}
-
-	device_set_paired(device, TRUE);
 }
 
 gboolean device_is_creating(struct btd_device *device, const char *sender)
diff --git a/src/event.c b/src/event.c
index 47b50c4..009839e 100644
--- a/src/event.c
+++ b/src/event.c
@@ -272,6 +272,9 @@
 	if (!get_adapter_and_device(local, peer, &adapter, &device, TRUE))
 		return;
 
+	if (status == 0)
+		device_set_paired(device, TRUE);
+
 	if (!device_is_authenticating(device)) {
 		/* This means that there was no pending PIN or SSP token
 		 * request from the controller, i.e. this is not a new