shared/gatt-db: Fix crash when generating hash
The following crash can be observed when handles are not contiguous:
Invalid write of size 8
at 0x452697: gen_hash_m (gatt-db.c:314)
by 0x453FE8: gatt_db_service_foreach (gatt-db.c:1395)
by 0x45408C: service_gen_hash_m (gatt-db.c:322)
by 0x4548F1: foreach_service_in_range (gatt-db.c:1284)
by 0x4548F1: foreach_in_range (gatt-db.c:1307)
by 0x457470: queue_foreach (queue.c:220)
by 0x453B75: gatt_db_foreach_service_in_range (gatt-db.c:1349)
by 0x453BAC: gatt_db_foreach_service (gatt-db.c:1254)
by 0x453C46: db_hash_update (gatt-db.c:340)
by 0x4567B4: timeout_callback (timeout-glib.c:34)
Change-Id: Idc0456441e2b94935e7475e25b62428277180797
Signed-off-by: himanshu <h.himanshu@samsung.com>