shared/gatt-client: Don't clear db in case of errors

If the db was not empty when initializing the instance set the
discovery last handle to avoid clearing the database in case of
cache validation error.

(cherry picked from commit e43847bc6bf27d731657baed9a816d3bd42861db)

Change-Id: I93c59cfed2afe5d9f97fb3005f24531cf850afc4
1 file changed