Suggestion from Andreas Schäfer: we really only need sqrt(freeprocs)
primes.  This considerably reduces the computational load when
freeprocs is large.

cmr=v1.7.5:reviewer=hjelmn:subject=MPI_Dims_create optimization
Gah; I missed the #include in r30539.

cmr=v1.7.5:ticket=#4217
Remove a bunch of extra whitespace.

Thanks to Andreas Schäfer for the original patch.
Silence some Solaris warnings reported by Paul Hargrove

cmr=v1.7.4:reviewer=jsquyres:subject=Silence some Solaris warnings