Make ID::distance public.
Add Contact and Buckets types.
Implement distance_rank.