[io] Drop TypeOf dependency. Add detail::interior_ring_iterator<>.
[algorithms] Drop TypeOf dependency