scudo: Make prepareTaggedChunk() and resizeTaggedChunk() generic.

Now that we have a more efficient implementation of storeTags(),
we should start using it from resizeTaggedChunk(). With that, plus
a new storeTag() function, resizeTaggedChunk() can be made generic,
and so can prepareTaggedChunk(). Make it so.

Now that the functions are generic, move them to combined.h so that
memtag.h no longer needs to know about chunks.

Differential Revision: https://reviews.llvm.org/D100911

GitOrigin-RevId: 3d47e003e922d5a7c18575f9c30a3098ccdb3040
2 files changed