Restore evented measurements after refactoring all messages.
Cache measurement IDs when a subclass is first constructed.

Previously we only cachd it if you registered for one as a listener -
this is a bit more direct and we create the ID -> class linking earlier.
Fix and test building evented measurements from messages.