[reflist] Make destroy callback optional for obj_del_ref call

This is required to support cases when access to reflist requires
external locking and destroy callback cannot be invoked with such
lock held. In this case caller has to check return value and then
invoke destroy routine.

Change-Id: I970aa4ff5bff7f030c4a50fc8836f0bd44b8ecca
diff --git a/include/reflist.h b/include/reflist.h
index b6d28ad..0fcd27e 100644
--- a/include/reflist.h
+++ b/include/reflist.h
@@ -73,7 +73,7 @@
 
 	list_delete(&ref->ref_node);
 	dead = list_is_empty(&obj->ref_list);
-	if (dead)
+	if (dead && destroy)
 		destroy(obj);
 	return dead;
 }