Add an assertion that the template argument `T` in `RefCountedBase<T>` must be the class derived from `RefCountedBase<T>`.
Add an assertion that the template argument `T` in `RefCountedBase<T>` must be
the class derived from `RefCountedBase<T>`.

PiperOrigin-RevId: 437314068

google/riegeli,google/riegeli,google/riegeli,google/riegeli