NumericDiffFunctor.

A wrapper class that takes a variadic functor evaluating a
function, numerically differentiates it and makes it available as a
templated functor so that it can be easily used as part of Ceres'
automatic differentiation framework.

The tests for NumericDiffCostFunction and NumericDiffFunctor have
a lot of stuff that is common, so refactor them to reduce code.

Change-Id: I83b01e58b05e575fb2530d15cbd611928298646a
6 files changed