findOptimalThreadCount function

Function that finds the optimal (fastest) thread count for different data.table functions