Fix crash on dragging titlebar buttons in System Settings
Summary:
Currently, if user tries to move one of buttons to the left, ending up
dragging one button onto another, crash occurs.
In addition, this patch replaces verbose replacement(remove/insert) with
more elegant QVector<T>::move(int, int)
BUG: 374153
FIXED-IN: 5.8.7
Reviewers: graesslin, KWin
Reviewed By: graesslin, KWin
Subscribers: kwin
Tags: KWin
Differential Revision: https://phabricator.kde.org/D5117