Fix for spurious assert in cv::compareHist

When comparing histograms that look like multi-channel images (e.g a 3D histogram, of 4x4x4 bins, might appear as a CV_32FC4 matrix), cv::compareHist would complain because it was expecting the matrix type() == CV_32F. Now we test matrix depth() == CV_32F instead.
Take account of multi-channel matrices when comparing histograms

Ensure that all channels are considered when comparing multi-channel histograms
fixed NPP error constants usage
fixed constructors for functional objects (added __host__ modifier)
rewrite core/cuda/vec_math.hpp file

old version isn't compiled with CUDA 5.5
new version doesn't depend on functional.hpp
fixed BroxOpticalFlow regression test

the output of BroxOpticalFlow differs a bit in CUDA 5.5
fixed BoxFilter sanity test (different rounding results)
fixed BroxOpticalFlow sanity test (increase epsilon value)
Merge pull request #964 from jet47:cuda-5.5-support
removed ogl::Texture2D support from InputArray
added CudaMem support to Input/Output arrays
renamed gpu headers (made it more consistent)
removed obsolete DevMem2D class
added Stream support to ogl::Buffer
moved inline implementation to separate file
moved GpuMat implementation to separate file
refactored GpuMat:

* switch to InputArray/OutputArray
* add Stream support
new implementation for GpuMat::setTo (without constant memory)
refactored CudaMem (now alloc type assign only in constructor)
refactored gpu::Stream (minor fixes)