Remove unneeded dynamic_cast's in Package implementation

Change-Id: Ia712af4a7ece608805580a17de0c7f4da935bef6
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>