Added additional matrix routines

Added routines to calculate the Moore-Penrose pseudoinverse of a matrix,
to gather a matrix from the nodes using the MPI communicator and to
do multiplication of a matrix by a scalar