ENH optimize forward-backward algorithm for LCCRF

Training is about 5% faster. If you pull this, the commit will end up in your branch.