Fixes for issues picked up by coverity
Summary: Mostly uninitialised variables and non checks for dynamic_cast
Test Plan: Run kreportexample and test rendering
Reviewers: staniek
Reviewed By: staniek
Tags: KReport
Differential Revision: https://phabricator.kde.org/D3827