Create the right ElementInfo for package declaration.

This resulted in a ClassCastException before.

Fixed #1000572.
Merge pull request #878 from dragos/issue/package-decl-class-cast

Create the right ElementInfo for package declaration.