insertOrderedList: implement listifying

Apart from tests of issue #39, this CL passes all listifying tests.

PTAL
When we introduce |var node = nodes[0]|, this function can be simpler.