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.
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.
Merge pull request #1521 from nailbiter:optimCG