TestFile: On destruction, close associated document if open and stop the background parser
Differential Revision: https://phabricator.kde.org/D18567