Move getNumThreads into a separate package so it can be used across multiple commands.
Move getNumThreads into a separate package so it can be used across multiple commands.

materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore