Cleanup: share code to add jobs to background parser in unit test
Subscribers: kdevelop-devel
Differential Revision: https://phabricator.kde.org/D8903