Stabilize and fix tst_qdeclarativetextinput on Windows.

Introduce a scoped pointer for the views to ensure cleanup
after failing tests. Clear text in maxLength().
Move calls to QDeclarativeView::setFocus() below activation
for it to set the "active" focus item correctly.

Add message to obtain more information about failing tests.

Task-number: QTBUG-32538

Change-Id: Id65afbdfb0f9fd70846958fcb28fdd0fe1bd70f7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Stabilize and fix tst_qdeclarativetextedit.

Introduce a scoped pointer for the views to ensure cleanup
after failing tests. Fix calculation in positionAt() to
use a QPaintDevice and the first line of the text.
Move calls to QDeclarativeView::setFocus() below activation
for it to set the "active" focus item correctly.

Task-number: QTBUG-32538
Change-Id: Ibf10d00b9bddd587f5721d5b5011f6eafc617f39
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>