OIDs should be thin wrappers

(Bug, To be Fixed , Priority: High, Test Status: No automated tests yet , Reported By Justin du Coeur, )
Summary: Querki was originally written in 2.10, and that occasionally shows -- it turns out that OID is an AnyRef pointing to a Long, which is an insane amount of memory. We can probably improve that by turning it into an AnyVal. (??)
Remind myself of when AnyVal breaks down, to make sure this actually makes sense. In particular, is the AnyVal as a Map key box-free? Not necessarily -- it looks like that is sort of dangerous.
What we're really looking for is a newtype, and we don't actually care about whether it is completely opaque. Maybe just use a type tag instead?
Really, the best answer is likely this newtypes library.
Later: On reflection, knocking this down from Critical to High, because I'm not sure how much it matter in practice. Consider: OIDs are mostly used as keys in PropertyBundles. If we fully optimized that -- made OID a newtype and specialized the Map -- we would go from an 8-pointer pointer to an OID to an 8-byte Long. There's no obvious improvement there. It would make a significant difference if a given OID had many distinct instances: if those pointers tended to be pointing to separate wrappers for the underlying Long. But it's unclear how often that is true. It might be common enough to matter (especially if reading in the Space produces large numbers of distinct case class instances), but we need to do some analysis before I'm sure that that is the case.