Cosmetics: CPPFlags are for cpp, talk about CXXFlags for c++.
(cherry picked from commit c515c12fa7a1d813b50596a5284a7d68457a2b7f)
Some constants need to be defined as static variables in Fortran.

See for example section 2.5.4 (Named constants) of the MPI2 standard.
http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-2.0/node13.htm
(cherry picked from commit 07bacc793410c12a213226b8be422a67157dd9de)
Initialize common variable.
(cherry picked from commit e7a5ad619cf4e2f0e38d9d02a338f67cf9a84c15)
Set smpi_currenk_rank at process init too.

The goal here, is that f77 common variables are correctly referenced,
even before mpi_init.
(cherry picked from commit 69018fc50f3c15c11e86618a06e3a2f9fc6aeeb3)
Variable exists only with SMPI_F2C.
(cherry picked from commit edd6d5b3fa9584a866953aecfe38faf90f27612e)