Feeding sequence labels to TemporalMemory and other refactors

Starts on https://github.com/numenta/nupic.research/issues/13.
Depends on https://github.com/numenta/nupic/pull/1338.

cc: @subutai