QDoc: Make Atom copying polymorphic
`Text::operator<<(const Atom&)` implements copying by inspecting the
atom and reconstructing the appropriate concrete object. In addition to
requiring `Text` to know about `LinkAtom`, this places knowledge of an
atom's representation outside the class being copied.
This change adds a virtual `clone()` operation to `Atom` and an override
in `LinkAtom`. Each implementation returns a detached copy of the
corresponding concrete type. `Text` can then append the resulting copy
without knowing its dynamic type or how its state is copied. The
existing copy semantics are left unchanged. This means that
`Atom::clone()` retains the current behavior of copying at most the
first two strings, while `LinkAtom::clone()` uses its existing copy
constructor.
This separates polymorphic copying from `Text`'s responsibility for
maintaining the atom chain and removes the explicit `LinkAtom` check
from the generic append path.
Task-number: QTBUG-150798
Change-Id: Ic4dcffba65bbb72206edbbfc2d39e12543c62179
Reviewed-by: Topi Reinio <topi.reinio@qt.io>