Add the 'primes' parameter to some functions

Allow to pass a list of primes to prime_factors(), sum_of_divisors()
and sum_of_proper_divisors()