Iterate over initializer_lists to avoid mem allocs
Summary:
I had to add a helper function to avoid messy
STL iterator code everywhere. Not an ideal solution,
but std::contains() simply still does not exist, yet :-)
Test Plan: make test
Reviewers: mwolff, apol
Reviewed By: apol
Subscribers: ngraham, Frameworks
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D9211