2 additional optimizations introduced:
1) count the distributions for all the digits in one shot (one file read instead of K, where K is the number of digits)
2) use primitive counters for single-thread mode (really improves the performance since AtomicLong performs much slower than primitive long)