adapter: Catch polling errors

Receiving a NFC_EVENT_TARGETS_FOUND with a NULL payload means the driver
entered an error state. This is handled by checking if the devices and
targets arrays are empty from the GET_TARGET finish handler.
In the polling error case, neard resets the adapter and starts polling
again.

The polling error handler runs asynchrounously for the D-Bus properties
toggle to be exported properly.
3 files changed