TaskModel: Harden taskmodel
TaskModel: Harden taskmodel

Invalid positions should not happen, but handle them anyway if they do.
There is one report about a crash in the task model that may be related
to this.

Task-number: QTCREATORBUG-13861
Change-Id: Iae1b25974220d3622ecc39bd1a073c299b843fea
Reviewed-by: Sandro Mani <86429e5c1f75e1f49cfa6dbe07037865f71eea17@gmail.com>
Reviewed-by: Daniel Teske <d8a411aec9a206efedb4d45b75fe8d13f1e2b628@theqtcompany.com>

martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,kuba1/qtcreator,danimo/qt-creator,Distrotech/qtcreator,danimo/qt-creator,xianian/qt-creator,kuba1/qtcreator,xianian/qt-creator,Distrotech/qtcreator,danimo/qt-creator,xianian/qt-creator,Distrotech/qtcreator,martyone/sailfish-qtcreator,danimo/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,danimo/qt-creator,kuba1/qtcreator,danimo/qt-creator,xianian/qt-creator,xianian/qt-creator,xianian/qt-creator,Distrotech/qtcreator,danimo/qt-creator,martyone/sailfish-qtcreator,kuba1/qtcreator,kuba1/qtcreator,kuba1/qtcreator,kuba1/qtcreator,martyone/sailfish-qtcreator,kuba1/qtcreator,danimo/qt-creator,kuba1/qtcreator,Distrotech/qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,Distrotech/qtcreator,Distrotech/qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,danimo/qt-creator