Refactor and split drmemtrace tracer.cpp
Splitting out from https://github.com/DynamoRIO/dynamorio/issues/3995#issuecomment-1063198769 Which came originally from https://github.com/DynamoRIO/dynamorio/pull/5393#discussion_r820264882
tracer.cpp has grown large and complex. The idea is to split it up into separate files and possibly classes or other organization for more modularity and easier maintainability.