adding method dims() to core.Mat

Hope it's ok that way. I'm knew to OpenCV and Git.