Tuned p7.

Maintaining a prime number dictionary that makes checking isPrime a bit
faster.
Added buildPrimes function.
Added comments of the general idea of the sieve algorithm.