Upgrade ceres to latest upstream version

This is needed because of some features of new Ceres
for further development.
Switch motion tracker bundle adjustment to Ceres.

Patch originally written by me, then finished by Sergey. Big
thanks to Sergey for troopering through and fixing the many issues
with my original (not compilable) patch.

The Ceres implementation uses 2 parameter blocks for each camera
(1 for rotation and 1 for translation), 1 parameter block for
common intrinsics (focal length etc) and 1 parameter block for
each track (e.g. bundle or 3D point).

We turn on some fancy optimizer options to get better performance,
in particular:

  options.preconditioner_type = ceres::SCHUR_JACOBI;
  options.linear_solver_type = ceres::ITERATIVE_SCHUR;
  options.use_inner_iterations = true;
  options.use_nonmonotonic_steps = true;
  options.max_num_iterations = 100;

Special thanks to Sameer Agarwal of Ceres fame for splitting out
the SCHUR_JACOBI preconditioner so that it didn't depend on
CHOLMOD.  Previously we could not use that preconditioner in
Blender because CHOLMOD is too large of a dependency for Blender.

BundleIntrinsicsLogMessage:
- Moved bunch of if(foo) LG << "bar" into this function, to make
  EuclideanBundleCommonIntrinsics a little bit easier to follow.

EuclideanBundle:
- Fix RMSE logging.
Switch euclidean intersection code to use Ceres

Would not expect any significant changes in solver
behavior, but it could be more accurate in some cases.

Switching projective intersection to ceres is marked
as a TODO for now.
Allow K1,K2 refirement combination

It is now possible to refine only radial distortion
with new Ceres based bundler and this new combination
is already used in Blender.
Fixed comment for euclidean bundling,
which is now supports raidal bundling independently
from other intrinsics.
Use threaded cost function, jacobian and linear solver
computation, so bundling is as fast as it could be with
current parameter block structure.
Move radial distortion code to own templated function

This shall not lead to any functional changes, just
avoids radial distortion code duplicated in camera
intrinsics and bundling code.

For fancier bundle adjustment support of  different
distortion models this is not actually enough and
would need to make some bigger changes, but this
changes makes code a bit easier to maintain already.
Increase verbosity level for reprojected markers info

This information is useful, but in cases when you, say,
working on a bundler it's annoying to scroll all the
information up.
Modal (aka tripod) solver rework

Several major things are done in this commit:

- First of all, logic of modal solver was changed.
  We do not rely on only minimizer to take care of
  guessing rotation for frame, but we're using
  analytical rotation computation for point clouds
  to obtain initial rotation.

  Then this rotation is being refined using Ceres
  minimizer and now instead of minimizing average
  distance between points of point of two clouds,
  minimization of reprojection error of point
  cloud onto frame happens.

  This gives quite a bit of precision improvement.

- Second bigger improvement here is using bundle
  adjustment for a result of first step when we're
  only estimating rotation between neighbor images
  and reprojecting markers.

  This averages error across the image sequence
  avoiding error accumulation. Also, this will
  tweak bundles themselves a bit for better match.

- And last bigger improvement here is support of
  camera intrinsics refirenment.

This allowed to significantly improve solution
for real-life footage and results after such
refining are much more usable than it were before.

Thanks to Keir for the help and code review!
Fixed incorrect order of arguments passing
to EXPECT_EQ in keyframe selection tests.
Update Ceres to 1.5RC3

It brings optimization of DENSE_QR and DENSE_SCHUR solvers.
Switch from DENSE_NORMAL_CHOLESKY to DENSE_QR

DENSE_QR is better behaved numerically and after recent
changes from Sameer there's no big difference in speed.
Code cleanup: don't use deprecated FFmpeg API functions
Code cleanup: use rw-rw-r-- mode for source files
Changes to unit testing

- Move ceres test binaries to ${LIBMV_TESTS_OUTPUT_DIR}/ceres,
  so they don't mess with libmv's application binaries and
  tests.

- Removed ceres_ prefix from ceres unit tests, only use this
  prefix for targets (targets need to be unique name).

- Added unit tests data for ceres, otherwise system_test fails.

- Restored "test" makefile target.
Code cleanup: silent type narrowing in qt-tracker
Code cleanup: no need to declare empty body for ProgressUpdateCallback:invoke

Make force this method to be overridden by derivative classes.
Also removed currently unneeded callbacks.cc.
Code cleanup: silent unused variables warnings
Code cleanup: removed more deprecated FFmpeg API usage

This time in qt-tracker application.
Update Ceres to upstream version 1.5.0