Fix visit of list-like AST nodes.
Fix visit of list-like AST nodes.

The method finish() of a list-like node will convert the circular
list to a single-list. The right way to iterate is by looking
at the member `next' and by invokign finish().

Change-Id: I85a45b691a6c7089cd1a765871a11a7c60c3cdff
Reviewed-on: http://codereview.qt.nokia.com/3780
Reviewed-by: Roberto Raggi <5b38c5be65ca2d75b92c40e91029e90f276fd4fe@nokia.com>
Reviewed-by: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com>

matthewvogt/qtdeclarative,jfaust/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,corngood/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,crobertd/qtdeclarative,matthewvogt/qtdeclarative,crobertd/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,jfaust/qtdeclarative,mgrunditz/qtdeclarative-2d,crobertd/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,crobertd/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,jfaust/qtdeclarative,corngood/qtdeclarative,corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,crobertd/qtdeclarative