app: Improve --project handling
Summary:
Before this patch --project PROJ had several flaws:
- Could not be used to open the project in an existing instance
- Could not be used to open a project if there was an already running KDevelop instance
With this change:
- We'll check which sessions contain PROJ
- We'll use the first match as the 'target session' to be opened
- Continue as usual
- If there's a KDevelop instance with that session open: activate
- If not: Open a new instance with said session
Reviewers: dfaure, brauch
Reviewed By: brauch
Subscribers: brauch, cullmann, kdevelop-devel
Differential Revision: https://phabricator.kde.org/D8842