Avoid deprecated MPI-1 constructs

This refactors the offending parallel_algebra.h code that uses deprecated MPI-1 constructs.

I'd appreciate testing from anyone who has a chance, I'm testing with all the MPIs I have.  This is some convoluted stuff and I'm not sure I comprehend it 100%, but I think the fix is good.