Change cc_ref and cc_unref from macros to inline functions.