Change some of the method APIs of MatrixBase class.

Method APIs of add_matrix(), mul_matrix() and inv() were changed.
Now the output is returned as an argument.
Implement wrappers for inv(), add_matrix() and mul_matrix()
Add tests