minor changes to configure.ac

as suggested by autoscan
add '#include <config.h>' to header files
add m4 function for dealing with mpi
add '--without-mpi' configure option to compile without mpi

code uses '#if USE_MPI' around mpi function calls