1. replace previous use of MatrixMxN in 4D with SquareMatrix<Scalar,4>
2. remove a potential memory leak in Quaternion
3. fix compile error in vector_4d.h due to incomplete code edit