improve parse error recovery paths
improve parse error recovery paths

to reduce collateral damage from parse errors.

(cherry picked from qtcreator/00c0d0d5e42d28e03c2846c17d3acbcd8420859d)
Change-Id: Ic59700d657069d3b15372509b4bff966057d27a9
Reviewed-by: Qt Doc Bot <2a514da5c3a85c7f105348b2fece084b6f59062f@qt-project.org>
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@nokia.com>
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@nokia.com>
(cherry picked from qtbase/ae3f95a951334dee001e37c305e4d7bf91c0d1b3)
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

mer-qt/qttools,mer-qt/qttools,mer-qt/qttools,mer-qt/qttools,mer-qt/qttools,mer-qt/qttools