Update the array indexing in matrix_lib.c

The new version uses square bracket notation instead of pointer
arithmetic and dereferencing.
The spaces in the for loops in this file are also improved, as is
indenting which was a little off.

Closes #22.