SparseCostMatrix: add an extra check to verify we are not out of bounds.

Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>
Embryonic sparse LAP tracker as in Jaquaman et al. 2008.

Right now there is the embryonic frame-to-frame linking support. it
copies what Nick did for the non sparse version, which copies the utrack
software rathter than the paper itself.

SparseLinker is as far as I want today.
Signed-off-by: Jean-Yves Tinevez <jean-yves.tinevez@pasteur.fr>