Simplify General Temporal Memory code

Fixes https://github.com/numenta/nupic.research/issues/80.