Revert "reverted changes to porter stemmer, because they inadvertently introduced different behaviour of the stemmer"

This reverts commit 2adb08c320052e82366684893600024fb0515a96.
fixes to earlier porter stemmer refactor
added special case to porter stemmer that avoids exceptions being thrown for a handful of perverse non-words
HMM: avoid O(N) lookups. This makes HiddenMarkovModelTrainer.train_supervised 30x+ times faster.

Note: demo_pos() execution time is currently dominated by entropy calculations.
cleanup HMM demo functions; tests for HiddenMarkovModelTagger._forward_probability
TST: more tests for HiddenMarkovModelTagger
simplify creation of _NINF arrays in nltk.tag.hmm
fix Baum-Welch probability calculations for multiple observation sequences
small demo improvements; make HiddenMarkovModelTagger.test use standard map/itertools.chain instead of LazyMap & friends
HiddenMarkovModelTagger.best_path uses a cache - it must be reset if transitions, priors or outputs are updated
HiddenMarkovModelTrainer.train_unsupervised must use the same states and symbols as model.

They can be different even if the same values are passed to constructor because HiddenMarkovModelTagger deduplicates them (and change their order).
Merge pull request #364 from ExplodingCabbage/master

Same improvements to the Porter stemmer as before, but without the bugs
Even if 'model' is not passed, we should use states and symbols from newly created model (because they may be different).
use enumerate (suggested by @larsmans)
kill hmm._NINF (thanks @larsmans for a suggestion)
Merge pull request #371 from kmike/hmm

HMM improvements
Created RandomProbDist class to handle creation of a uniform random distribution for initial guesses. In order to comply with existing code structure, especially in MutableProbDist class, the self._probs variable in RandomProbDist is necessarily a dictionary of random values. Numpy was not previously imported in probability.py, so used random module instead. Should tackle most of #373
all prob matrices (_priors, _transitions, _outputs) are randomly init. Tested, should fix #373
made changes suggested by @kmike, removed sum class method, self._sampleset
arrrgh, accidentally removed sampleset from UniformProbDist