Refactor Report._report_from_yaml and add unit tests

Make the YAML checks on Report._report_from_yaml instead of doing them
in the collect method. Add unit tests for proper parsing.
Move BaseCollector._to_hours method to utils