[KColorScheme/KStatefulBrush] Switch hardcoded numbers for enum items
Summary: This also replaces some for-loops with C++11 range based for-loops and switches for simpler if/else control blocks.
Test Plan: Open colorscheme editor in the Colors KCM to see if any colors or effects look broken.
Reviewers: Frameworks, dfaure
Reviewed By: dfaure
Subscribers: ngraham, kde-frameworks-devel
Differential Revision: https://phabricator.kde.org/D25677