number to words: insert items using iterators

This makes the core algorithm use iterators to insert/remove items
from the collection instead of using push_back/pop_front, making
it compatible with the new clause API.