Replace GENERATE_PRIMES() macro by templatized callbackPrimes() method