Fix loss function computation for hard clustering

- getLossFunction method in BregmanHardClustering was
  previously always returning sum of divergences to
  only the last component of the MixtureModel 'g'.