Merge pull request #277 from kostrzewa/MPI_Finalize

Make MPI_Finalize the last instruction executed
add functionality to invert to carry out measurements during the inversion, add separate executable 'offline_measurement' to carry out measurements independelty of the inverter or hmc