gatt: Fix potential invalid memory access

Attribute reading are asynchronous operations, this path fix replying
read request if ATT connection is available anymore.
gatt: Avoid unneeded store attributes

When creating services and characteristics from storage, this patch
avoids storing the same attribute just read from the file.
gatt: Add destroy callback to gatt_foreach_by_type

This patch adds a callback to inform the caller when the operation has
finished. This callback is needed to serialize operations.
gatt: Add destroy callback to gatt_foreach_by_info

This patch adds a callback to inform the caller when the operation
has finished. This callback is needed to serialize operations.
gatt: Serialize attributes discovery

This patch serializes the attribute discovery in order to be able to
call device profiles probe function only after all atttributes get
discovered.
gatt: Fix error format

The error parameter from the result callbacks (btd_attr_read_result_t
and btd_attr_write_result_t) should be in errno format.
gatt: Fix btd_gatt_read_attribute

In case there is no attrib associated to the given device, we should
return ECOMM error and generate a "Not Connected" error in D-Bus
interface.
gatt: Fix btd_gatt_write_attribute

In case there is no attrib associated to the given device, we should
return ECOMM error and generate a "Not Connected" error in D-Bus
interface.