Add runWithPlugin helper
Summary:
There is a common pattern:
BackgroundService.RunCommand
getDevice check device != null getPlugin check plugin != null doCode
Add a helper for this pattern and port existing code
Reviewers: KDE Connect, albertvaka
Reviewed By: KDE Connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: KDE Connect
Differential Revision: https://phabricator.kde.org/D16472