Make attribute getters truly const (and non-const)
Summary:
Also cleans up the code a little.
This change requires const fixes basically everywhere where the API
is used, please do NOT merge this until everything else has been
adjusted.
Subscribers: dfaure, kde-pim
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D19942