MB-13008: fix crash in fdb_close if fdb_open fails then succeeds

Fix memory leaks and free objects in kv_instance if _fdb_open fails
Fix memory leak in fdb_snapshot_open if _fdb_open fails

Change-Id: I8935fb659dd2bf309bf5b70754e751dc8653929b