Don't calculate attribute() twice.
Summary:
"kateTextLine" neither "i" shouldn't have changed since the first call to attribute two lines ago.
Test Plan: Open a XML file with 4 lines and a line of 566039 characters long.
Reviewers: Frameworks, Kate, dhaumann
Reviewed By: Kate, dhaumann
Subscribers: dhaumann
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D11491