Implement new C++ data structure to power algorithms

Fixes #216.
Obsoletes https://github.com/numenta/nupic.core/pull/217.
Done: https://github.com/numenta/nupic.core/pull/220/files#diff-89d5bc79d4594f9a54f12c12c7bf6496R183