better impl of diag now that Matrix is no longer a VectorBase, but a MatrixBase