Add unit tests for various matrix operations, some of them brand new