Fixes to QueryResult::fetchAll() and QueryResult::useCache() methods