* Working prediction cache
* States now copied with malloc and initialised with calloc.
* Drafted feature kernel function. May be better way to do this.
* Various speed fixes for beam, including cache use
* Added cache support for svm