Make iterating over Layer enum simple
Having a function with a confusing comment, to iterate over the enum,
is mostly confusing. Make it boring by just moving the cast to the one
place that uses it.
Reviewers: KWin, romangg, zzag
Reviewed By: KWin, romangg, zzag
Subscribers: zzag, kwin
Differential Revision: https://phabricator.kde.org/D23085