This patch implements the algorithm in my preprint "A multimodular algorithm for computing Bernoulli numbers".
http://math.harvard.edu/~dmharvey/bernmm/
It adds a few files into a new bernmm directory, a cython wrapper (bernmm.pyx), modifies setup.py to build those files, removes the old implementation of bernoulli_mod_p_single, and adds a new algorithm option and a num_threads option to the global bernoulli() function.
My main concern from a build point of view is whether pthreads is supported on all of our target platforms. If not, it will be necessary to modify setup.py to conditionally remove the -lpthreads option and also to #define USE_THREADS appropriately.