Use rtl::Reference instead of std::auto_ptr

Change-Id: I4402b0b259c0dcd03a222993c861114028d6fb75