Fix crash in writer collection and cleanup
WriterCollection was apparently never used.
It crashed upon destruction due to bogus
deletion of the writer plugins.
This carries over some code of the
ExtractorCollection and cleans up a little
bit along the way. Adds a simple test.
Reviewers: bruns, mgallien, ngraham
Reviewed By: bruns
Subscribers: apol, kde-frameworks-devel, Baloo
Differential Revision: https://phabricator.kde.org/D23411