quattor/functions/hardware: Provide function for max_threads
quattor/functions/hardware: Provide function for max_threads

Refactor to provide a function for obtaining max_thread count while preserving the behaviour of get_num_of_cores and avoiding too much duplicated code.

quattor/template-library-core,jrha/template-library-core