primes: fix the ugly use of passing the size by reference

I think this pretty much makes these c programs now... But I did this
because looking at the code in the driver (primes.cpp) I was confused by
how things were happening...
primes: change variable index to n_primes for clarity
primes: allow primes matched including max_size