Make MpiParallelTask as bit more general

Use a vector<int> for the input to and output from the reduce method
instead of explicitly using three integers.
Add a complete method with the correct calls to MPI_Recv.