Add TypeManifest thing for TreeMap/Set.
The code seems to be fragile with types, at least when interoperating with scala.
This is a weird attempt to get strong typing down into everything.