QmlDesigner: Refactor clear position code in NavigatorTreeModel

Change-Id: Ib2866296c03db0ab8866a3b99761ef83c5000884
Reviewed-by: Marco Bubke <marco.bubke@digia.com>