kcms/keys: Fix applications model load
The current model calls beginResetModel then starts an asynchronous task which will finally call endResetModel. All the time m_components and thus the rowCount is changing.
It is undefined to process events between begin and end calls.
This patch introduced a temporary variable whilst loading components so we can make a simpler synchronous reset.
Edited by David Edmundson