Move Dot from SGVector to CMath

I have checked the build and unit-tests. They are running fine. Not able to test all the examples though. There is some problem with Ubuntu so I'm not able to install anything.
What i meant by non-vector part is that if we pass pointers instead of
vector objects(SGVector). If we pass pointers as it is done in this piece
of code then we will have to pass another argument to the linalg::dot
function i.e. Length of the vector explicitly.