Optimizer monitor

Adds monitor object for optimizer classes. This needs to be merged after #270 (and subsequently rebased).
Nitpick, but it's actually (1, 2, 3).