Function that adds a constant scalar to matrix.
Loads the "+=" operator. Scalar a is added to all matrix entries of A by A += a