Implement new, flexible monitor mixin framework

Fixes https://github.com/numenta/nupic/issues/1370.
Fixes https://github.com/numenta/nupic/issues/1357.
Fixes https://github.com/numenta/nupic/issues/1342.
Fixes https://github.com/numenta/nupic/issues/1333.

Requesting cursory review: @subutai