Simple measures support

Support for simple measures... basically computes histograms from simple measures.

I occasionally get errors when running this on mango, but most of them looks like server errors, like instance out of disk space... whilst others have disappeared as I introduced more sanity checks (but could also be that they disappeared on their own).

Either way, last run was successful... so think this works :)