Refactor: Break cmCTestTestHandler::ProcessHandler() into smaller functions
This commit was originally going to be part of a larger MR I'm currently working on, but !3570 (merged) caused conflicts with it, and I've decided to get it merged before anything else ends up conflicting with it.