[src/kpac/*] replace deprecated foreach with range for
Summary:
Change addresses() to make it return a const QList &, this way it can
be iterated over, with a range-for, without detaching.
Test Plan: make && ctest
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D24350