Respect `use` statements when creating generic types
Fixes xp-framework/core#20
Add tests verifying hashCode() is called for keys and values