UPSTREAM: core/gatt: Fix not able to read/write on reconnections

Upon reconnecting the attributes may already be available from cache
which mean the client would be able to issue commands while discovery
is not complete thus btd_gatt_client_ready was not called yet.

To fix now btd_gatt_client_ready is split into btd_gatt_client_connected
which is called whenever connected leaving btd_gatt_client_ready to only
deal with exporting services found during the discovery.

BUG=chromium:529387

Change-Id: Ia47dd9fac9fa0892f9f039b8468189391944ab3f
Reviewed-on: https://chromium-review.googlesource.com/297974
Commit-Ready: Jakub x Jakub Pawlowski <jpawlowski@chromium.org>
Tested-by: Jakub x Jakub Pawlowski <jpawlowski@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
3 files changed