scudo: Move getChunkFromBlock() allocated check into caller. NFCI.

With tag-on-free we will need to get the chunk of a deallocated block. Change
getChunkFromBlock() so that it doesn't check that the chunk is allocated,
and move the check into the caller, so that it can be reused for this purpose.

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

GitOrigin-RevId: e966416ff15178bf982430085be9ae69e5a511fa
1 file changed