Some of this is improvement to code suggested by Hal Finkel. Four changes here:
- Cleanup of hierarchy code to handle all hierarchy cases whether affinity is available or not
- Separated this and other classes and common functions out to a header file
- Added a destructor-like fini function for the hierarchy (and call in __kmp_cleanup)
- Remove some redundant code that is hopefully no longer needed