[NewFileIndexer] Use correct mimetype for folders, check excludeFolders
Summary:
mimeTypeForFile yields the wrong type for folders, hardcode it.
In case a newly added folder is an excluded folder, avoid adding it to
the index.
Test Plan:
$> balooctl config add ~/test/excluded
$> mkdir ~/test
$> mkdir ~/test/excluded; mkdir ~/test/included.log/
$> balooshow -x ~/test/*
'excluded' should not be in the index, 'included.log' should have
mimetype inode/directory (terms 'Minode Mdirectory').
Reviewers: Baloo, ngraham, astippich, poboiko
Reviewed By: poboiko
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D21705