Upstream: bluetooth: Add device to hash before registration
During the connman_device_register() procedure a lookup to the
bluetooth_devices hash table happens, however the device is not on the
hash at this point and the look out fails.
If the registration fails, technology_disable() returns the Failed
message on D-Bus with the error status zero. That happens because we
don't have any device registered.
This patch moves the insertion of the device to before the device
registration.
Change-Id: Iaa0bd5b878e7bcbfdd4518f042da2fd740861bbe