Cython alternative to #1825 

Here .fit and .eval should be about 10-20% faster than #1825 on large HMMs and several times faster on tiny HMMs. _decode_viterbi should be on par with #1825.

_logsum is not moved to _extmath in this pull request.

For the record: I slightly prefer #1825 because of simplicity, but if there are use cases for HMMs with small number of parameters but slow training, this PR should be preferred.