astobj2: Add warn unused attribute to some functions.

* Fixed resulting warnings with improper use of ao2_global_obj_replace().

* Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the
equivalent and more appropriate ao2_global_obj_release() call.
........

Merged revisions 398533 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@398557 f38db490-d61c-443f-a65b-d21fe96a405b
cdr: Fix some ref leaks.

* Added missing unregister of the cdr container in cdr_engine_shutdown().

* Fixed ref leak in off nominal path of cdr_object_alloc().

* Removed some unnecessary NULL checks in cdr_object_dtor().
........

Merged revisions 398562 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@398564 f38db490-d61c-443f-a65b-d21fe96a405b