[JobTest] Fix unit test intermittent failure
In statWithInode, assigning the return from job->statResult(), which
returns a const &, to a const & could lead to a crash if the job (KJob)
finishes and get deleted before we access the KIO::UDSEntry var. Don't
use a & in that case.
ACK'ed by dfaure in https://phabricator.kde.org/D28478