[Codecs] Remove unneeded const_cast
Summary:
QByteArray accepts a const char* in the constructor, no need to cast
the const away.
Also make it obvious we are using the const overload of data() by
replacing it with constData().
Reviewers: Baloo, Frameworks, poboiko, ngraham, dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D16306