[dolphin/search] Add method isIndexEnabled()
Summary: Extracts the logic for checking if the current path is indexed to its own method.
Test Plan: No behavior changes
Reviewers: elvisangelaccio, ngraham, meven
Reviewed By: ngraham, meven
Subscribers: meven, kfm-devel
Tags: Dolphin
Differential Revision: https://phabricator.kde.org/D24478