[server] Cache current mode
Summary:
Instead of looping over all modes for retrieving current mode data copy it
to a separate variable.
Test Plan:
KWin auto tests pass and KScreen in Wayland nested session shows correct
information.
Reviewers: KWin, davidedmundson
Reviewed By: KWin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: Frameworks
Maniphest Tasks: T11459
Differential Revision: https://phabricator.kde.org/D23493