Refactor and update capacity experiment

Fixes https://github.com/numenta/nupic.research/issues/91.
Fixes https://github.com/numenta/nupic.research/issues/93.