Check cursor_open return value
Summary:
This will only fail if something else has already gone wrong, but I was
hitting a crash in the baloo runner on the first cursor fetch.
We may as well catch it and handle it gracefully with the right error message.
Test Plan: Unit tests
Reviewers: apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel, Baloo
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D25775