Squashed commit of the following:

commit bb721ff08e7731a53e239c37a40e597e5db01f1b
Author: Bernhard X. Kausler <bernhard.kausler@iwr.uni-heidelberg.de>
Date:   Sun Jan 20 16:50:35 2013 +0100

    simplified Chaingraph constructor exploiting the ChaingraphModelBuilder

commit 035378285b96820a66325a07ffc3bb8e91e6cf5f
Author: Bernhard X. Kausler <bernhard.kausler@iwr.uni-heidelberg.de>
Date:   Fri Jan 18 12:39:22 2013 +0100

    copying chaingraphmodel builder in Chaingraph constructor

commit bd20d7ffbe30674a72d7279901ea273cb7016d2a
Author: Bernhard X. Kausler <bernhard.kausler@iwr.uni-heidelberg.de>
Date:   Thu Jan 17 20:36:39 2013 +0100

    ChaingraphModelBuilder now takes HypGraph as build parameter. No need to hold the shared ptr to the Hyp Graph anymore
ChaingraphModelBuilder: renamed operator() in build()
ChaingraphModelBuilder: build now returns raw pointer (let user decide
if to use a smart pointer or not)
checkpoint
* include/pgmlink/reasoner_opengm.h: ChaingraphModel interface for
  node and var maps implemented
ChaingraphModel: added var_category() method
ChaingraphModelTrainer::train halfway implemented
collected all chaingraph related code in a namespace chaingraph;
renamed classes accordingly
moved all chaingraph code to pgm_chaingraph.h
renamed graphical_model.h to pgm.h and consolidated namespace pgm code there
added missing pgm.cpp
renamed reasoner_opengm.h to reasoner_pgm.h
made det vars optional in add_outgoing_factor()
chaingraph::TrainableModelBuilder now handels with_detection_vars option
chaingraph::TrainableModelBuilder now handels with_divisions option
Trainable cg model builder refinements now respect optional features
implemented EventsStatistics
fixed bug in collect_events_statistics()
moved impl of ModelTrainer to pgm_chaingraph.h
added lossfunction to OpengmModel typedef