Fix issue with convergence criterion.
Make double_matrix a real class.

This ensures proper initialization of the matrices we are using in the
CRF algorithms. (This class might be moved into the util namespace later.)