Initial commit for Conjugate Gradient method

Implementation is based on
http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf

So far we only have basic interface and empty test. But it compiles at
least.
Refined interface for Conjugate Gradient

Some interface was refined (most notably, the method for returning
Hessian was removed and the method for getting gradient was added as
optional to base Solver::Function class) and basic code for
setters/getters was added. Now is the time for the real work on an
algorithm.
switched to new device layer in gpucodec module
Finish implementing the Nonlinear Conjugate Gradient

Now everything is prepared for the pull request.
Minor fixes

Fix failed builds that opencv's buildbot has got.
Added the copyright statements

Added the copyrights missing in all files that required so.
Add cv::logPolar, cv::linearPolar, and a python example
fixed compilation error "ambiguous symbol" on CUDA 5.0:

disabled Texture Reference API for old CUDA toolkits
fixed gridTransform overloads problems
used new device layer for cv::gpu::add
used new device layer for cv::gpu::subtract
used new device layer for cv::gpu::multiply
used new device layer for cv::gpu::divide
used new device layer for cv::gpu::absdiff
used new device layer in math per element operations
fixed assertion
used new device layer for cv::gpu::compare
fixed warnings
switched to new device layer in bitwize operations
switched to new device layer in min/max