[platforms/drm] Restore previous mode if an atomic test fails
Summary:
When KWin successfully presents a new mode, it stores the current state
as the last working mode. If a new modeset is requested and the atomic
test fails, all is undone and reverted to this last knowing mode.
Currently included are:
- the mode
- global position
- transformation
This is only done on a modeset not when going to DPMS.
Test Plan:
Selected the not working vertical rotation and nothing bad
happened.
Reviewers: KWin, Plasma, subdiff
Subscribers: plasma-devel, kwin
Tags: KWin
Differential Revision: https://phabricator.kde.org/D8602