Statically allocate arrays such as SEQ, SUBSEQ, C32, D64, BJ64,
instead of using malloc.

In bsgs64 we compute b = 5^Q (mod p) for each p. This could be made more
efficient by precomputing y = 5^x where x is the largest divisor of Q such
that 5^x < p_min, then computing b = y^(Q/x) (mod p) for each p.

Write a version of powmod64(a,n,p) optimised for multiple consecutive calls
with the same values of n and p, for use in setup64(). Maybe using
Montgomery multiplication?  *** Tried a left-right method using a
precomputed ladder, which allows one less fildll/fmul per iteration by
holding b/p on the FPU stack. Nice in theory, slower in practice. ***

Choose the number of baby and giant steps (and hashtable size?) based on
the actual rather than expected number of subsequences passing the power
residue tests.

Create Legendre lookup tables in shared memory for use by all sieve
instances. Or better: fork() once for each CPU and call sieve() from each
child process. Write a serialised get_next_range() function that each child
can call from within prime_sieve(), and serialise the reporting of factors.
Assuming memory is copy-on-write, Legendre lookup tables and small_primes
arrays will be implicitly shared, but the subsequence bitmaps will have to
be explicitly shared and protected with a semaphore. Status reports and
checkpointing can be handled by the parent process. It is unlikely that any
performance gains will result (except perhaps on systems where L2 cache is
shared?)
