Add implementation of Collector, etc.

Add implementation of Collector, RootPtr, and EdgePtr.