[scudo] Detach the hooks from Scudo's internal implementation

Move the invocation of hooks from Scudo internal to wrapper_c.cpp and
wrapper_c_bionic.cpp respectively. Therefore, Scudo's core algorithm
doesnt need to worry about the reentrant of hooks and leave the caring
of reentrant to the hook users.

Reviewed By: hctim, cferris, chelfi

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

GitOrigin-RevId: 4f76810d4860d851f069aa0caca24c54ab698c3b
8 files changed