Fix QSGVisualDataModel test failure.
Because the list view isn't visible it won't trigger a relayout unless
forced by something like calling count() which means the test is
looking up a stale list of items.
VisualDataModel also wasn't clearing its cache when it changed the
root item and so could return an old item if the view didn't release
all items before querying a new one.
Task-number: QTBUG-21416
Change-Id: I71193e22965f30ea92d9861ccbeff30b64d58309
Reviewed-on: http://codereview.qt-project.org/4953
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>