Add 3d correlation based on blas matrix multiplication 

If you can add a few test with verify_grad, to make sure that the grad method is well implemented, it would be great.