Begin refactoring in crf implementation.

This makes the scoring (state_, state_exp_, trans_, trans_exp_) wrapped in
its own class so that we can re-use it later. The idea here is to
(eventually) avoid having to keep these member variables at all and instead
just re-use a scorer object during training.