Refactor Code for Readability and Fix Implicit Conversions
added [[nodiscard]], made the code more readable, converted an int to a bool, indicated that we are dealing with a null pointer, made 'determine_thread_count' function static, fixed implicit conversion in 'tnlMPIDebugAttached' condition.