VCS: Decide file/project control by top level

Instead of actual file.

In case currentFile is a directory, it is cleared, and project top level
is used instead. This leads to unexpected results.

This patch corrects repository resolution in stash dialog when opened
inside a submodule.

Task-number: QTCREATORBUG-10397
Change-Id: I070cc7f9cbebe3be800dbbb9569cf73f540a6d14
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Git: Open LogChangeDialog on top of the main window

Change-Id: I9fe92f4e1e91e7a4a80a34e802d0d6b8d92b77e4
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>