Augment monitor mixin framework

Fixes https://github.com/numenta/nupic/issues/1459.
This seems to be the same as the function in plot.py. Do you need both copies?