Full testing of TextMonitor.
Update of measure.

Measure was broken because of the API change in the monitor factory (workbench, decl, order) and because of the updated set_state API (now taking database entries as second arg).