Merged changes from trunk: added intrusive_ref_counter.